Installing MySQL
Installing MySQL
I have already successfully installed the apache webserve and php using the command shown in Shallax's tutorial.
emerge apache mod_php php
Now I want to install MySQL. Is there any trick to doing this or can I just do an:
emerge mysql
to get it? Thanks.
emerge apache mod_php php
Now I want to install MySQL. Is there any trick to doing this or can I just do an:
emerge mysql
to get it? Thanks.
-
- Gentoox Guru!
- Posts: 1681
- Joined: Sun Sep 28, 2003 11:59 am
- Location: Manchester, UK
-
- Linux User
- Posts: 12
- Joined: Fri Jan 16, 2004 7:14 am
Immediately after the emerge type the following:
This adds the default database.
Code: Select all
/usr/bin/mysql_install_db
-
- Gentoox Guru!
- Posts: 1681
- Joined: Sun Sep 28, 2003 11:59 am
- Location: Manchester, UK
-
- Gentoox Guru!
- Posts: 1681
- Joined: Sun Sep 28, 2003 11:59 am
- Location: Manchester, UK
you need to add the -p switch to the mysqladmin and mysql commands to make it prompt you for a password. Like this
or
Then enter your mysql root password and you are away.
I don't know about a gui client I always make dump files and create tables that way.
The mysql website is the best place for info, the manual is very detailed and explains everything you need to know
Code: Select all
mysql -p
Code: Select all
mysqladmin -p
I don't know about a gui client I always make dump files and create tables that way.
The mysql website is the best place for info, the manual is very detailed and explains everything you need to know
If you keep an open mind, will your brain fall out?
-
- Gentoox Guru!
- Posts: 1681
- Joined: Sun Sep 28, 2003 11:59 am
- Location: Manchester, UK
as long as you use the -p flag it should work e.g if you want to create a database called newdb the command would be
You need to add a -p flag and maybe also -u and -h
you should then be prompted for the root@localhost password
If you can't get this to work forget about using mysqladmin and just use the mysql client which can do all the same stuff
Code: Select all
mysqladmin create newdb
Code: Select all
mysqladmin -u root -h localhost create newdb -p
If you can't get this to work forget about using mysqladmin and just use the mysql client which can do all the same stuff
If you keep an open mind, will your brain fall out?
-
- Gentoox Guru!
- Posts: 1681
- Joined: Sun Sep 28, 2003 11:59 am
- Location: Manchester, UK
You need to do some reading on the mysql site.
What you have created is a database (not a table) tables exist inside databases. A mysql server can host several databases all with several tables.
You can just use the root username and password or you can create new users using the GRANT command.
What you have created is a database (not a table) tables exist inside databases. A mysql server can host several databases all with several tables.
You can just use the root username and password or you can create new users using the GRANT command.
If you keep an open mind, will your brain fall out?
-
- Gentoox Guru!
- Posts: 553
- Joined: Tue Oct 07, 2003 9:57 pm
- Location: MOUNT TAPE U1439 ON B3, NO RING
Since MySQL is a relational database, you have >=1 table per db. Like this:
Code: Select all
+===============================+
| ------- A Database -----------|
+===============================+
|----+=====================+----|
|----| A table ------------|----|
|----+=====================+----|
|-------------------------------|
|----+=====================+----|
|----| Another Table ------|----|
|----+=====================+----|
|-------------------------------|
+===============================+
MOUNT TAPE U1439 ON B3, NO RING
Q: HOW DO I RUN MAGIC ??
A: You run magic by not typing in capital letters.
Q: HOW DO I RUN MAGIC ??
A: You run magic by not typing in capital letters.