安装Mysql的坑
ERROR 1146 (42S02): Table ‘mysql.role_edges’ doesn’t exist
用Mysql 8.0版本的会出这个问题,先强制你修改密码,然后修改密码过程中又出现这个错误,网上很多人说可以mysql_upgrade来修复系统表:
>mysql_upgrade -u root -p
然而我的情况是,没有修改密码就无法升级表.这就陷入了一个死锁. 修复表->需要修改密码->缺少mysql.role_edges->需要修复表.
所以决定弃坑装mysql低版本
将mysql卸载干净
卸载mysql
yum erase mysql清除rpm包
rpm -aq | grep mysql //查看还有哪些rpm包 rpm -e packages //一个个删干净清除系统中的残留
find / -name mysql rm -rf <directory>
安装低版本mysql
Download and add the repository, then update.
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm yum updateInstall MySQL as usual and start the service. During installation, you will be asked if you want to accept the results from the .rpm file’s GPG verification. If no error or mismatch occurs, enter y.
sudo yum install mysql-server sudo systemctl start mysqldChange default password
sudo mysql_secure_installation
C#中使用mysql
MySql.Data.MySqlClient.MySqlException (0x80004005): The host 127.0.0.1 does not support SSL connecti
原因是MySQL的dll不匹配 建议不要使用NuGet推荐的DLL 要使用MySQL自带的DLL导入即可解决.
根据本身服务器上的mysql版本来选择connector的版本,可以直接在NuGet包中选择版本第一点的包
版权声明:本文为yinanmo5569原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。