Difference between revisions of "MySQL"

From ArchWiki
Jump to: navigation, search
m (Configuration)
Line 18: Line 18:
 
  DAEMONS=(... @mysqld ...)
 
  DAEMONS=(... @mysqld ...)
 
=Configuration=
 
=Configuration=
Once you've started the MySQL Server, you probably want to add a root account in order to maintain your MySQL users and databases. Do so by issuing this command as root:
+
Once you've started the MySQL server, you probably want to add a root account in order to maintain your MySQL users and databases. Do so by issuing this command as root:
 
  # mysqladmin -u root password YOUR_PASSWORD
 
  # mysqladmin -u root password YOUR_PASSWORD
 
This will add a root account using YOUR_PASSWORD.
 
This will add a root account using YOUR_PASSWORD.

Revision as of 13:43, 13 May 2007

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

Introduction

MySQL is a widely spread, multi-threaded, multi-user SQL database. For more information about features, see the official homepage.

Installation

Install the mysql package:

# pacman -S mysql

After installing MySQL you should run arch's init script as root:

# /etc/rc.d/mysqld start

This will take care of the basic configuration as adding system users and creating log files. You may add mysqld to your DAEMONS array in /etc/rc.conf to start the MySQL database at system startup:

DAEMONS=(... @mysqld ...)

Configuration

Once you've started the MySQL server, you probably want to add a root account in order to maintain your MySQL users and databases. Do so by issuing this command as root:

# mysqladmin -u root password YOUR_PASSWORD

This will add a root account using YOUR_PASSWORD. Then you'll be able to do further configuration using you favorite interface. For example you can use MySQL's command line tool to login as root into your MySQL server:

$ mysql -p -u root