To Start MySQL
This section covers the following topics:
To Set Up MySQL
You need to perform these steps only if you are using Solaris or Linux
platforms.
-
Create a MySQL user account.
Refer to your operating
system manual for instructions on how to create a user account. It is recommended
that you create an operating system user account called mysql and
group called dba for performing MySQL operations. Ensure
that install-dir/mysql and its subdirectories including
the data directory are owned by this user account.
-
Initialize the grant tables.
On Solaris, at the command
prompt, you can use the following commands to initialize grant tables:
-
cd install-dir/mysql.
-
sh scripts/mysql_install_db --no-defaults --basedir=install-dir/mysql
--datadir=install-dir/mysql/data
See Also
See http://dev.mysql.com/doc/refman/5.0/en/index.html for detailed post-installation instructions for setting
up MySQL.
To Start or Stop MySQL
Before You Begin
On Solaris, Linux, or Mac OS, ensure that you have completed the steps
at To Set Up MySQL. Ensure that you read
this option file and change values as appropriate and as documented at http://www.mysql.com, prior to server startup.
-
To start MySQL:
-
On Solaris, Linux, or Mac OS, use the following command: Start:
./bin/mysqld_safe --defaults-file=install-dir/mysql/mysql.ini --user=user
-
On Windows, you can do one of the following:
-
Click Programs > Sun Microsystems > Sun Java SystemApplication Server 9.1 Update 1 with MySQL Community Server >
Start MySQL 5.0 Database.
-
If you created a Windows service, start the ASMySQL service
through the Control Panel.
-
To stop MySQL:
-
On Solaris, Linux, or Mac OS, use the following command: Stop:
bin/mysqladmin -u root shutdown -p
-
On Windows, you can do one of the following:
-
Click Programs > Sun Microsystems > Sun Java SystemApplication Server 9.1 Update 1 with MySQL Community Server >
Stop MySQL 5.0 Database.
-
If you created a Windows service, stop the ASMySQL service
through the Control Panel.