56,677
社区成员
发帖
与我相关
我的任务
分享
pwd
/usr/local/mysql/bin
./mysqld_safe --skip-grant-tables &
use mysql;select user, host from user;
Empty set (0.00 sec)。
INSERT INTO user(host, user, password, select_priv, insert_priv, update_priv) VALUES ('localhost', 'root', PASSWORD(‘12345'), 'Y', 'Y','Y');
select user,host from user;
+------+-----------+
| user | host |
+------+-----------+
| root | localhost |
+------+-----------+
1 row in set (0.01 sec)
quit
killall mysqld
cd ../share/mysql/
./mysql.server start
Starting MySQL.. SUCCESS!
mysql -uroot -p12345
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password
ES)
[root@linux bin]# ./mysql_install_db --user=root --force --basedir=/usr/local/my
sql --datadir=/usr/local/mysql/var/mysql
Installing MySQL system tables...
131213 15:09:33 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133332 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd: 0x4944a8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x41ba5df8 thread_stack 0x30000
[0x41ba4ba4]
[(nil)]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x4a5070 = REPLACE INTO tmp_user SELECT @current_hostname,'root','
','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y
','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0 FROM dual WHERE LOWER( @cu
rrent_hostname) != 'localhost'
thd->thread_id=1
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Installation of system tables failed! Examine the logs in
/usr/local/mysql/var/mysql for more information.
You can try to start the mysqld daemon with:
shell> /usr/local/mysql/libexec/mysqld --skip-grant &
and use the command line tool /usr/local/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/local/mysql/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/mysql/var/mysql that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!
use mysql;
select user, host from user;
找一台能登录root的机器,以root登录后执行:
Grant all privileges on *.* to root@'%' identified by 'admin';
flush privileges;
然后本地就可以登录了。