使用mysql的使用发生的错误

xiaoxiao2021-02-28  107

一、错误:在我error: 'Access denied for user 'root'@'localhost' (using password: NO)'

root@PovodoIptv:/usr/local/src/freepbx# mysqladmin -u root create asterisk

mysqladmin: connect to server at 'localhost' failed

error: 'Access denied for user 'root'@'localhost' (using password: NO)'

解决办法:

1、/etc/init.d/mysql stop

2、mysqld_safe --skip-grant-tables &

使用OK,成功创建

二、错误:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}'; ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解决办法:

mysql> flush privileges;

转载请注明原文地址: https://www.6miu.com/read-69267.html

最新回复(0)