美文网首页
mysql错误

mysql错误

作者: 我是电饭煲 | 来源:发表于2020-04-07 12:01 被阅读0次

    Can't connect to local MySQL server through socket '/tmp/mysql.sock'

    rm -rf /var/lib/mysql
    sudo systemctl start mysqld
    sudo systemctl status mysqld
    

    mysql删除数据库提示Error dropping database

    https://blog.csdn.net/free_xiaochen/article/details/84300600

    有外键约束,不能删除表(Cannot delete or update a parent row: a foreign key constraint fails)

    // 先设置外键约束检查关闭 
    SET foreign_key_checks = 0;  
     // 删除表,如果要删除视图,也是如此
    drop table table1; 
    // 开启外键约束检查,以保持表结构完整性
    SET foreign_key_checks = 1; 
    

    https://blog.csdn.net/u010429286/article/details/79042886

    Native table 'performance_schema'.'???' has the wrong structure(通常是mysql更新或重装出现)

    sudo mysql_upgrade -u root -p
    // 重启
    sudo systemctl stop mysqld
    sudo systemctl start mysqld

    not allowed to connect to this MySQL server

    添加远程ip访问权限

    GRANT ALL PRIVILEGES ON . TO 'root'@'192.168.199.99' IDENTIFIED BY '密码' WITH GRANT OPTION;
    flush privileges;

    mysql安装在centos7报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    https://blog.csdn.net/mo_qi_qi/article/details/84573350

    MySQL 5.7 创建用户报错 ERROR 1805 (HY000): Column count of mysql.user is wrong

    mysql_upgrade -uroot -p
    http://blog.itpub.net/26506993/viewspace-2154944/

    ERROR 1682 (HY000): Native table 'performance_schema'.'threads' has the wrong structure

    • 都是mysql重装,版本升级导致的问题

    mysql_upgrade -uroot -p

    相关文章

      网友评论

          本文标题:mysql错误

          本文链接:https://www.haomeiwen.com/subject/cblnzqtx.html