mysql的默认密码_mysql默认密码是多少

展开全部

mysql默认密码设置如下命令就可以获得:

cd/

PATH="$PATH":/usr/local/mysql/bin

mysql -u root -p

mysql>use mysql;

mysql> UPDATE user SET password=PASSWORD("new password") WHERE user=username;

mysql> FLUSH PRIVILEGES;

mysql> quit;

within the directory the archive extracted into. If you compiled

MySQL yourself you must run ‘make install’ first.

就可以获得MySQL的初始密码。

扩展32313133353236313431303231363533e4b893e5b19e31333433633433资料:

mysql的其他错误解决办法:

1、Starting MySQL.Manager of pid-file quit without updating fi[失败]

关于这个错误原因有很多,最大的可能是没有创建测试数据库:

可以用/usr/local/mysql/scripts/mysql_install_db –user=mysql命令进行创建;另外一个原因可能是权限设置问题,需要赋予mysql的data权限,可以用chmod -R 命令。

2、FATAL ERROR: Could not find /home/mysql/bin/my_print_defaults If you are using a binary release,you must run this script from

within the directory the archive extracted into. If you compiled

MySQL yourself you must run ‘make install’ first.

这个错误,是没有指明mysql的data路径导致的,可以很简单的进行解决:

vim /etc/my.cnf

在[mysqld] 后面加上路径:

basedir = /usr/local/mysql

datadir =/opt/data;

3、-bash: mysql: command not found:

用mysql命令进行登陆mysql报错,原因是没有设置环境变量,需要设置,或者进入到bin目录进行登陆cd /usr/local/mysql/bin

mysql -u root

展开全部 mysql默认密码设置如下命令就可以获得: cd/ PATH="$PATH":/usr/local/mysql/bin mysql -u root -p mysql>use mysql; mysql> UPDATE user SET password=PASSWORD("new password") WHERE user=username; mysql> FLUSH PRIVILEGES; mysql> quit; within the directory the archive extracted into. If you compiled MySQL yourself you must run ‘make install’ first. 就可以获得MySQL的初始密码。 扩展32313133353236313431303231363533e4b893e5b19e31333433633433资料: mysql的其他错误解决办法: 1、Starting MySQL.Manager of pid-file quit without updating fi[失败] 关于这个错误原因有很多,最大的可能是没有创建测试数据库: 可以用/usr/local/mysql/scripts/mysql_install_db –user=mysql命令进行创建;另外一个原因可能是权限设置问题,需要赋予mysql的data权限,可以用chmod -R 命令。 2、FATAL ERROR: Could not find /home/mysql/bin/my_print_defaults If you are using a binary release,you must run this script from within the directory the archive extracted into. If you compiled MySQL yourself you must run ‘make install’ first. 这个错误,是没有指明mysql的data路径导致的,可以很简单的进行解决: vim /etc/my.cnf 在[mysqld] 后面加上路径: basedir = /usr/local/mysql datadir =/opt/data; 3、-bash: mysql: command not found: 用mysql命令进行登陆mysql报错,原因是没有设置环境变量,需要设置,或者进入到bin目录进行登陆cd /usr/local/mysql/bin mysql -u root
经验分享 程序员 微信小程序 职场和发展