blu에서 mysql을 설치했는데 설치가 정상적으로 진행된 것처럼 보입니다. Mysql 내가 까다로운 경우에도 루트 암호를 설정할 수 없습니다. 테이블이 모두 누락 된 것처럼 나타납니다. 아래 세부적인 출력.스노우 레오파드에 brew install mysql이 작동하지 않습니다.
jb:~ jb$ brew install mysql
==> Downloading http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.55.tar.gz
######################################################################## 100.0%
==> Downloading patches
==> Patching
patching file scripts/mysqld_safe.sh
Hunk #1 succeeded at 384 (offset 1 line).
patching file scripts/mysql_config.sh
==> ./configure --without-docs --without-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/mysql/5.1.55 --l
==> make install
==> Caveats
Set up databases with:
unset TMPDIR
mysql_install_db
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mysql/5.1.55/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
If this is an upgrade and you already have the com.mysql.mysqld.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
cp /usr/local/Cellar/mysql/5.1.55/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
Note on upgrading:
We overwrite any existing com.mysql.mysqld.plist in ~/Library/LaunchAgents
if we are upgrading because previous versions of this brew created the
plist with a version specific program argument.
Or start manually with:
mysql.server start
==> Summary
/usr/local/Cellar/mysql/5.1.55: 220 files, 42M, built in 17.6 minutes
jb:~ jb$ echo $TMPDIR
/var/folders/uL/uLRuoWTeFi86v2TkZkknLU+++TI/-Tmp-/
jb:~ jb$ unset TMPDIR
jb:~ jb$ echo $TMPDIR
jb:~ jb$ mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/Cellar/mysql/5.1.55/bin/mysqladmin -u root password 'new-password'
/usr/local/Cellar/mysql/5.1.55/bin/mysqladmin -u root -h jb.local password 'new-password'
Alternatively you can run:
/usr/local/Cellar/mysql/5.1.55/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local/Cellar/mysql/5.1.55 ; /usr/local/Cellar/mysql/5.1.55/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/Cellar/mysql/5.1.55/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/Cellar/mysql/5.1.55/bin/mysqlbug script!
jb:~ jb$ cp /usr/local/Cellar/mysql/5.1.55/com.mysql.mysqld.plist ~/Library/LaunchAgents/
jb:~ jb$ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
jb:~ jb$ /usr/local/Cellar/mysql/5.1.55/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
MADNESS 계속되는 ...
내가 소유 확인했다 지역은/usr :
jb:~ jb$ sudo chown -R `whoami` /usr/local
jb:~ jb$ which mysql
/usr/local/bin/mysql
심지어 '그랜트 테이블을 건너'와 MySQL을 시작하고 암호를 설정하려 :
를jb:~ jb$ launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
jb:~ jb$ killall mysqld
No matching processes belonging to you were found
jb:~ jb$ mysqld_safe --skip-grant-tables
110314 15:09:01 mysqld_safe Logging to '/usr/local/var/mysql/jb.local.err'.
110314 15:09:01 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
다른 터미널 창에서 :
jb:~ jb$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.55 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> UPDATE mysql.user SET Password=PASSWORD('pretend_strong_password_here') WHERE User='root'; FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)
Rows matched: 0 Changed: 0 Warnings: 0
Query OK, 0 rows affected (0.03 sec)
mysql>
행에 영향을주지 않아야하는 것은 무엇입니까? 테이블이 만들어지지 않은 것 같은가요? mysql_install_db
을 sudo
과 함께 사용해야합니까?
추신 : 나 자신이 mysql-5.1.54를 다운로드 할 때 실패한 양조 수식을 무시하고 dl 5.1.55로 편집했음을 무시하고이 모든 것을 직접 가져 왔습니다. 그러나 그 외에도 내가 여기서 잘못한 것을 볼 수있는 것이 있습니까?
편집 : http://forums.mysql.com/read.php?10,277700,280261#msg-280261 및 http://palmeradev.blogspot.com/2010/12/fix-bug-mysql-root-user-not-created.html
는 mysql 데이터베이스에서 user 테이블에 루트 사용자를 만들 수 MySQL의 쿼리의 몇 가지를 나타냅니다. 해당 쿼리가 작동하지 않습니다. 오류가 발생합니다.
mysql> INSERT INTO user VALUES ('localhost','root',password('newpassword'),'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);
ERROR 1136 (21S01): Column count doesn't match value count at row 1
코드가 실제로 두렵게 보입니다! 시도해 보거나 짧게 만드십시오 ... 많은 사람들이 그 모든 광기로 대답하기를 원하지 않을 수도 있습니다!? ;) – gideon
고마워, Giddy. 문제를 스스로 좁힐 수 있다면 터미널 출력을 더 많이 줄일 것입니다. 나는 대답이 내 얼굴 앞에서 어딘가에 있기를 바라고있다. –
'사용자'테이블에 루트가 있습니까? 즉, 'select * from user;'를 실행하면 뭐가 보이니? – zlog