4、修改mysqladmin用戶密碼--使用root用戶 passwd mysqladmin 提示: Changing password for user mysqladmin. New UNIX password: BAD PASSWORD: it is too simplistic/systematic Retype new UNIX password: passwd: all authentication tokens updated successfully.
11、二進制安裝 scripts/mysql_install_db --user=mysqladmin --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data 提示: Installing MySQL system tables...2017-12-19 11:39:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). OK Filling help tables...2017-12-19 11:39:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 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:
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 . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com New default config file was created as ./my.cnf and will be used by default by the server when you start it. You may edit this file to change server settings
WARNING: Default config file /etc/my.cnf exists on the system This file will be read by default by the MySQL server If you do not want to use this, either remove it, or use the --defaults-file argument to mysqld_safe when starting the server
12、啟動mysql--使用mysqladmin用戶 su - mysqladmin cd /usr/local/mysql rm -rf my.cnf bin/mysqld_safe & 驗證是否啟動:ps -ef|grep mysqld、netstat -tulnp | grep mysql
13、登錄mysql,并修改mysql中的root密碼內容--使用mysqladmin用戶 mysql mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 注:如mysql數據庫名稱,則退出(exit)使用:mysql -uroot -p,提示輸入密碼時直接回車 mysql> use mysql mysql> update user set password=password('123456') where user='root'; mysql> select host,user,password from user; mysql> delete from user where user=''; mysql> select host,user,password from user; mysql> flush privileges; 若澤大數據交流群:671914634