1,安装的方法菜鸟教程上有:入口
mysqld --initialize
#命令是出现如下错误Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2,数据库初始化
默认情况下,数据已经初始化好,数据可参见默认配置文件/etc/my.cnf
在其他位置重新初始化MySQL数据库:
basedir是mysql的安装根目录,ldata是数据初始化的目录
mysql_install_db --basedir=/ --ldata=./data
相关提示:
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: mysqladmin -u root password 'new-password' mysqladmin -u root -h gzns-map-tc-spd-server-shanghai00.gzns.baidu.com password 'new-password' Alternatively you can run: mysql_secure_installation which will also give you the option of removing the test databa