使用MySQL5.6离线二进制安装包安装在成功执行
./scripts/mysql_install_db --user=mysql --basedir=/opt/mysql --datadir=/opt/mysql/data --socket=/tmp/mysql.sock之后, 如果./bin/mysql_secure_installation提示总提示.sock找不到的问题时,需要尝试如下过程:
1. 进入mysql根目录执行#chown -R root .#chown -R mysql ./data2. 进入安全模式,设置数据库访问权限#/etc/init.d/mysqld stop#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &#mysql -u root>FLUSH PRIVILEGES;>UPDATE user SET PassWord=PASSWORD('newpassword') where USER='root';>UPDATE user SET authentication_string=PASSWORD('newpassword') where USER='root';>FLUSH PRIVILEGES;>exit#service mysqld restart
新闻热点
疑难解答