我让MySQL在MAMP下工作,现在它不再工作,我不知道为什么。我正在尝试卸载所有MySQL,我想设置它,当我键入mysql时,mysql数据库将启动,当我键入localhost / phpMyAdmin时,phpMyAdmin应该启动。
然而,我确实遇到了这样的问题:
1)
brew install mysql
SEICCN-3:~ stefanieness$ brew install mysql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.6.21.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/mysql-5.6.21.mavericks.bottle.tar.gz
==> Pouring mysql-5.6.21.mavericks.bottle.tar.gz
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To connect:
mysql -uroot
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
==> Summary
/usr/local/Cellar/mysql/5.6.21: 9620 files, 339M
SEICCN-3:~ stefanieness$ mkdir -p ~/Library/LaunchAgents && cp /usr/local/Cellar/mysql/5.5.20/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ && launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
cp: /usr/local/Cellar/mysql/5.5.20/homebrew.mxcl.mysql.plist: No such file or directory
SEICCN-3:~ stefanieness$ mkdir -p ~/Library/LaunchAgents && cp /usr/local/Cellar/mysql/5.6.21/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ && launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
SEICCN-3:~ stefanieness$ unset TMPDIR && mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Installing MySQL system tables...2014-11-20 15:41:18 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-11-20 15:41:18 93248 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-11-20 15:41:18 93248 [Note] InnoDB: The InnoDB memory heap is disabled
2014-11-20 15:41:18 93248 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-11-20 15:41:18 93248 [Note] InnoDB: Memory barrier is not used
2014-11-20 15:41:18 93248 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-11-20 15:41:18 93248 [Note] InnoDB: Using CPU crc32 instructions
2014-11-20 15:41:18 93248 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-11-20 15:41:18 93248 [Note] InnoDB: Completed initialization of buffer pool
2014-11-20 15:41:18 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:18 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:18 93248 [Note] InnoDB: Retrying to lock the first data file
2014-11-20 15:41:19 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:19 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:20 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:20 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:21 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:21 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:22 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:22 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:23 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:23 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:24 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:24 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:25 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:25 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:26 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:26 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:27 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:27 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:28 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:28 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:29 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:29 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:30 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:30 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:31 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:31 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:32 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:32 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:33 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:33 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:34 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:34 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:35 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:35 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:36 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:36 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:37 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:37 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:38 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:38 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:39 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-11-20 15:41:39 93248 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-11-20 15:41:40 93248 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
直到无穷大。
2)如何设置MySQL root密码和mysqladmin密码。我经常收到错误ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
After some trials, I go `ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)` but still the same error.
3)当我输入localhost
时,我可以使用它,但是当我输入:localhost/phpMyAdmin
时,它只显示文件夹结构。就像那样:https://www.dropbox.com/s/9wnacznpk80s54j/Screenshot%202014-11-20%2015.48.30.png?dl=0
非常感谢你!