Bạn có chắc chắn muốn xóa bài viết này không ?
Update mysql from 5.6 to 5.7 on MAC
Here is another scenario (version upgrade):
I reinstalled my OS (Mac OS El Captain) and installed a new version of mysql (using homebrew). The installed version (5.7) happened to be newer than my previous one. Then I copied over the tables, including the ib* files, and restarted the server. I could see the tables in mysql workbench but when I tried to select anything, I got "Table doesn't exist".
- stop the mysql server e.g.
brew services stop mysql
- start the server using
mysqld_safe --user=mysql --datadir=/usr/local/var/mysql/(change path as needed)
mysql_upgrade -u root -p password(in another terminal window)
- shut down the running server
mysqladmin -u root -p password shutdown
- restart the server in normal mode
brew services start mysql
Copy from this answer