Setting up mysql on Fedora

This is a quick how to on setting up mysql on Fedora. These commands are run on the terminal and may require root access. To change users use this command: su root
Install mysql packages:

yum install mysql mysql-devel mysql-server

Start the mysql server:

service mysqld start

If you want the mysql service to start everytime the machine starts do:

chkconfig mysqld on

Set up the root password for mysql:

mysqladmin -u root password <strong><em>yourpassword</em></strong>

To get into a mysql prompt do:

mysql -u root -p

The above will change your terminal prompt from something like “[annasob@ireland 1.0]$” to “mysql>”

Create a User and set their privileges in a mysql prompt

CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;

After this you can create databases and create tables.

View all of my blogs

Advertisements

One thought on “Setting up mysql on Fedora

  1. Pingback: Sync Server « Anna on Computing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s