Install and configure MySQL 5 with MacPorts
2013-05-18 22:19
459 查看
Install MySQL 5
You can install using Porticus, Port Authority, or from the command line:?
Create initial MySQL databases
MySQL databases are kept in /opt/local/var/db/mysql5/ and you'll notice that this directory is empty. Run mysql_install_db to create the mysql and test databases.?
?
Options for starting MySQL
I personally don't want MySQL to start at system start up, I'll start it manually when I need it. If you're energy conscious and set your Mac to go to sleep you won't want to set mysqld to start at system boot either. If, however, you need MySQL to alwaysstart at system boot
?
?
?
?
like mysqladmin5. Now you're ready to start your MySQL server with:
?
?
Confirm that MySQL is running
If MySQL's okay, you should see a server start confirmation message. You can test to ensure that MySQL is running with (leave password empty when prompted):?
?
?
?
?
Set Basic MySQL Security
Finally, set the root mysql password to secure your server.?
Moving MySQL data from other installations
If, like me, you want to move data from a previous MySQL 5 install (i.e. /usr/local/mysql/data), be sure to stop MySQL first. You'll want to overwrite the mysql database you created after installation when copying over data files and indices. Ensure thateverything copied to /opt/local/var/db/mysql5/ remains owned by mysql. Refer to the MySQL documentation if you're upgrading from MySQL 4 to 5.
Now get busy querying.
相关文章推荐
- Install and configure GNS3 with TunTap on the Mac
- Install liferay framework and integrate with MySql or other database
- php install with mysql on w2k3 and IIS mannually
- How to install and configure Apache, PHP, MySql and phpMyadmin on ubuntu
- [MySQL]Install and Configure MySQL in Ubuntu
- Install and set JAVA home on MAC OS with commandline
- Manual install on Windows 7 with Apache and MySQL
- How to install and configure Apache, PHP, MySql and phpMyadmin on ubuntu
- install opencv3 with python2.7 bindings on Mac using Hombrew and git
- How To Install and Configure Django with Postgres, Nginx, and Gunicorn
- install mysql using binary and configure manu
- How to Install Apache Tomcat 8 (on Windows, Mac OS X, Ubuntu) and Get Started with Java Servlet Prog
- install opencv 3.0.0 with python 3.4 on Mac using Homebrew and Git
- How to install Nginx, PHP, PHP-FPM and MySQL under Windows with Cygwin
- source install MacPorts--checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions
- configure JDBCRealm JAAS for mysql and tomcat 7 with form based authentication--reference
- Install Nginx with PHP5 and MySQL (LEMP) in Ubuntu 13.10 Server
- Mysql install failed with dependencies error
- Google Merchant How To Setup A Live XML Data Feed With MySql and PHP