su2901 发表于 2015-11-16 17:59:33

军哥有个问题想请教一下,谢谢指导一下。

我用lnmp一键安装包安装好了,但是我想在安装一个3307的MYSQL数据库,是执行这句话就行了么?/usr/local/mysql/scripts/mysql_install_db --defaults-file=/etc/my3307.cnf --basedir=/usr/local/mysql3307 --datadir=/data/mysql3307/var --user=mysql
如果是就执行这句话是错误的,还是说要在之前执行什么?求指导。谢谢!

licess 发表于 2015-11-16 19:17:15

肯定不行,你basedir是/usr/local/mysql3307,你却非要用/usr/local/mysql的脚本

su2901 发表于 2015-11-17 09:17:30

回复 1# 的帖子

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/mysql3307/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql3307/bin/mysqladmin -u root -h iZ25mevjx6bZ password 'new-password'

Alternatively you can run:
/usr/local/mysql3307/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/mysql3307 ; /usr/local/mysql3307/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql3307/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/


那我这样是成功了没?/usr/local/mysql3307/bin/mysqladmin -u root password 我用这个命令设置不了密码。。。不知道怎么回事。

su2901 发表于 2015-11-17 09:39:59

回复 2# 的帖子

军哥,我要怎么才能在安装一个3307端口的数据库呢??我源码安装也出错。。

licess 发表于 2015-11-17 17:56:30

回复 3# 的帖子

上面已经成功,3楼的信息上已经给出了完整的教程
页: [1]
查看完整版本: 军哥有个问题想请教一下,谢谢指导一下。