参考
http://my.oschina.net/ctojp/blog/89905
1. 官方下载安装包
2.解压包
3.创建链接
ln -s **/mysql-5.5.28-linux2.6-x86_64 /usr/local/mysql
4.建立mysql组:groupadd mysql 和建立mysql用户并设置组:useradd -g mysql mysql
5.cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
6. 安装 sudo scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql
期间报错Installing MySQL system tables...
/usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
执行 sudo apt-get install libaio1 安装缺少的包
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql//bin/mysqladmin -u root password 'new-password'
/usr/local/mysql//bin/mysqladmin -u root -h [pc-name] password 'new-password'
Alternatively you can run:
/usr/local/mysql//bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/mysql/ ; /usr/local/mysql//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql//mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/mysql//scripts/mysqlbug script!
7.启动与测试 mysql
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl
8. 安装 mysql-workbench-gpl-5.2.44-1ubu1204-amd64.deb 管理器
期间可能提示缺少包 libctemplate0_0.97-1_amd64.deb
本文提供了一步一步的指导来帮助您在Ubuntu 12.10上安装Mysql数据库,包括从官方下载安装包到配置管理工具的全过程,并解决了一些常见的安装问题。
916

被折叠的 条评论
为什么被折叠?



