Ubuntu 9.04安装Mysql Proxy Lua是本文要介绍的内容,主要是来了解Mysql Proxy在Ubuntu 9.04下的安装环境,并且已经通过测试,具体内容来看本文详解。
安装mysql
1、
1. apt-get install mysql-server mysql-client libmysqlclient15-dev
2、进入
1. mysql mysql -uroot -p
密码root
3、重新设置mysql用户root的密码
1. GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "123456";
4、创建新数据库 proxy
1. create database proxy;
5、创建用户test 对proxy库有全部操作权限
1. grant all privileges on proxy.* to test@localhost identified by "zhaogongyu";
6、允许test用户可以从任意机器上登入MySQL。
1. 第一步:grant all privileges on proxy.* to test@"%" identified by "zhaogongyu";
2.
3. 第二步:$sudo gedit /etc/mysql/my.cnf
老版本
1. skip-networking => #skip-networking
新版本
1. bind-address=127.0.0.1 => bind-address= 你机器的IP
这样就可以允许其他机器访问MySQL了
7、重启mysql命令
1. sudo /etc/init.d/mysql restart
8、开机启动mysql
1. vim /etc/rc.local
将下面这一行加入到最后一行
1. cd /usr/bin; /usr/bin/safe_mysqld --user=root &
2. exit 0
注意:记得加上cd /usr/local/mysql-5.1.36;并在改句后面加个空格,不然会导致无法自动在开机的时候启动
9、从数据库导出数据
1. mysqldump -uroot