문제
MySQL 5.5 => 5.6 마이그레이션 후
사용자 계정을 추가하려 하는데 아래와 같이 에러가 발생했다.
1004lucifer
Error Saving Account
Error creating account cms@%: Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50556, now running 50636. Please use mysql_upgrade to fix this error.
Error creating account cms@%: Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50556, now running 50636. Please use mysql_upgrade to fix this error.
해결
아래와 같이 조치 후 사용자 계정 추가가 정상적으로 동작되는 것을 확인했다.
1004lucifer
C:\Users\1004lucifer>mysql_upgrade -u root
Looking for 'mysql.exe' as: C:\utils\mysql-5.6.36-winx64\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\utils\mysql-5.6.36-winx64\bin\mysqlcheck.exe
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
# mysqld --standalone 으로 프로세스 띄운 후 정상적으로 작동
C:\Users\1004lucifer>
C:\Users\1004lucifer>
C:\Users\1004lucifer>mysql_upgrade -u root
Looking for 'mysql.exe' as: C:\utils\mysql-5.6.36-winx64\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\utils\mysql-5.6.36-winx64\bin\mysqlcheck.exe
Running 'mysqlcheck' with connection arguments: "--port=3306" "--socket=/tmp/mysql.sock"
Running 'mysqlcheck' with connection arguments: "--port=3306" "--socket=/tmp/mysql.sock"
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
Running 'mysqlcheck' with connection arguments: "--port=3306" "--socket=/tmp/mysql.sock"
Running 'mysqlcheck' with connection arguments: "--port=3306" "--socket=/tmp/mysql.sock"
OK
C:\Users\1004lucifer>
PS.
mysql_upgrade 명령어가 잘 되지 않는경우 아래의 참고한 링크를 확인.
참고
https://serverfault.com/questions/527422/mysql-upgrade-is-failing-with-no-real-reason-given
댓글
댓글 쓰기