1, # cd/usr/ports/databases/mysql51-server2, # make install clean next is waiting for the system to download the MySQL package, compile and install 3, #/usr/local/bin/mysql_install_db install and initialize database 4, # chown-r MySQL/var/DB/MySQL # chown-r MYSQL: mySQL/var/DB/MySQL # chmod 777/var/DB/MySQL can be started next,/usr/local/bin/mysqld_safe &
5. To enable msyql to support remote logon, you must add the remote logon user information to log on to MySQL:/usr/local/bin/MySQL. Add the user: Format: grant permission on Database Name. table name user @ login host identified by "User Password ";
For example: grant select, update, insert, delete on *. * To root@192.168.0.2 identified by "root ";
Update user logon to any host: update user set host = '%' where user = 'root' and Password = 'root ';
Add User information to the DB table: insert into DB
Values ('%', '%', 'root', 'y ', 'y ', 'y', 'y', 'y ');
Update dB set host = '%' where user = 'root ';