onsite.blogg.se

Clean install mysql mac os x
Clean install mysql mac os x







  1. #Clean install mysql mac os x how to
  2. #Clean install mysql mac os x mac os x

Set the owner and permissions accordingly for the new data directory: scripts/mysql_install_db -datadir=/usr/local/mysql2/dataĬheck and note the ownership of the original mysql data directory:ĭrwxr-x- 39 _mysql wheel 1326 5 sep 13:05. This is described in Chapter 5.īefore we can do anything, we need to initialize the default database directory. You must use launchctl to load (=start) or unload (=stop) the server instances.

#Clean install mysql mac os x mac os x

On Mac OS X Server, there is no such thing. $ cp /system/library/launchdaemons/ ./Įdit the new file and change its contents to: $ ls /system/library/launchdaemons/*mysql* We can simply copy the one installed by Mac OS X Server to the correct folder and modify its contents. Therefore we must create a launchd parameter list file to start the second instance of MySQL automatically when the computer starts. On Max OS X Server, the MySQL installation is started via launchd. We need one too, so we create /var/mysql2/. MySQL uses a data directory to store all files and databases in, /var/mysql/. Getting started (Mac OS X Server installation) $bindir/mysqld_safe -defaults-file=/etc/my2.cnf -datadir=$datadir -pid-file=$server_pid_file $other_args >/dev/null 2>&1 &Īnd save the file. We need one too, so we copy the default one and name it /usr/local/mysql/support-files/rver.Įdit this script and change / add the following: MySQL uses a startup-script to start or stop its deamon, /usr/local/mysql/support-files/rver. SCRIPT="/usr/local/mysql/support-files/rver"ĬonsoleMessage "Starting MySQL database server"ĬonsoleMessage "Starting instance 2 of MySQL database server"ĬonsoleMessage "Stopping MySQL database server"ĬonsoleMessage "Stopping instance 2 of MySQL database server"ĬonsoleMessage "Restarting MySQL database server"ĬonsoleMessage "Restarting instance 2 of MySQL database server"ĬonsoleMessage "Could not find MySQL startup script!"ĬonsoleMessage "Could not find instance 2 of MySQL startup script!" SCRIPT="/usr/local/mysql/support-files/rver"

clean install mysql mac os x

# A script to automatically start up a second instance of MySQL on system bootup # A script to automatically start up MySQL on system bootup # /Library/StartupItems/MySQL2COM/MySQL2COM # /Library/StartupItems/MySQLCOM/MySQLCOM To configure the startup of the second instance, duplicate the MySQLCOM directory:Įdit the MySQL2COM file (it is a script file) and change the following: When the startup item is installed, you will find it here:ĭrwxr-xr-x 4 root wheel 136 /library/startupitems/MySQLCOMĪs you can see, this is a directory. On Max OS X, to start MySQL when your Mac starts, you must install the StartupItem and the System Preferences Pane that come with the download. You can find the correct name of the PID-file in the default MySQL installation directory: MySQL uses a config file, /etc/my.cnf. We need one too for the new instance, so we copy the default one and we name it /etc/my2.cnf.Įdit the file and change, or add, the following options: We need one too, so we create /usr/local/mysql2/data/. MySQL uses a data directory to store all files and databases in, /usr/local/mysql/data/. Getting started (manual MySQL installation) Manage the multiple instances with MySQL WorkbenchĢ. Getting startedThe other chapters have subsections for each type of installation. Getting started- for a server Mac, like an Xserve or a Mac Mini Server, where you just switch MySQL on via Server Admin. for a client Mac, like an iMac at home or at work, where you install MySQL manually. If you cannot log in as root, you must use the sudo-command in front of almost every terminal command. To identify a second instance, we chose to use a 2 as the suffix for configuration files and such and we will be running it over port 3307 (the default port of MySQL is 3306).īefore you start, open Terminal and log in as root.

#Clean install mysql mac os x how to

We did set this up on Mac OS X, but the instructions for the manual installation of MySQL should be portable, with minor changes, to other UNIX and Linux distributions (-> Instructions on how to install MySQL manually). Each instance should have its own data directory so we can separate loads across multiple mysqld daemons and set up replication for different servers onto one server. We searched for an easy method to create as many individually running MySQL instances on one computer as we want. Thanks go to Bob Vos for helping sorting this out.

clean install mysql mac os x

Install multiple MySQL instances On Mac OS X Client and Server









Clean install mysql mac os x