2007年9月17日 星期一

mysql install --Mac OS X (TAR packages)

下載 Mac OS X (TAR packages)

1.解壓縮放到自已方便記住的地方

2.執行以下的command

shell> scripts/mysql_install_db --user=root
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &

3.加上權限

macbook@jimmys-Macbook[[~/data/mysql/bin]$./mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database testdb character set utf8;
Query OK, 1 row affected (0.04 sec)

mysql> grant all on *.* to jimmy@localhost identified by '1234';
Query OK, 0 rows affected (0.00 sec)

4.測試

macbook@jimmys-Macbook[[~/data/mysql/bin]$./mysql -u jimmy -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.45 MySQL Community Server (GPL)

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> select * from user;

沒有留言: