Howto: MySQL on Mac OS
Here's a howto about installing MySQL on Mac OS tiger.
First you need the MySQL installation package for Mac OS.
You can download it here.
The package contains a readme file, the MySQL application itself, and a MySQLStartupitem, for automaticly starting MySQL server at boot up. The package also contains a prefPane file, which controls the MySQL server.
First install the MySQL application, and the prefPane file, and if necessary the Startupitem.
After this, we're going to add 2 aliases, mysql and mysqladmin:
It's highly recommended to change the password, which is blank per default.
Enter the following commands:
To reset a root password that you forgot (using paths on our system):
First you need the MySQL installation package for Mac OS.
You can download it here.
The package contains a readme file, the MySQL application itself, and a MySQLStartupitem, for automaticly starting MySQL server at boot up. The package also contains a prefPane file, which controls the MySQL server.
First install the MySQL application, and the prefPane file, and if necessary the Startupitem.
After this, we're going to add 2 aliases, mysql and mysqladmin:
#> alias mysql=/usr/local/mysql/bin/mysql
#> alias mysqladmin=/usr/local/mysql/bin/mysqladminIt's highly recommended to change the password, which is blank per default.
Enter the following commands:
#> mysql -u root mysql
#> SET PASSWORD FOR root@localhost=PASSWORD('mypassword');
#> mysql -u root mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)#> mysql -u root -p mysqlTo reset a root password that you forgot (using paths on our system):
mysqld --skip-grant-tables --user=root[root@host root]# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 3.23.41
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> USE mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> UPDATE user
#> SET password=password("newpassword")
#> WHERE user="root";
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit;
[root@host root]#killall mysqldComments
add a comment
This blog is gravatar enabled.
Your email adress will never be published.
Comment spam will be deleted!