Koozali.org: home of the SME Server

What is the user name and password for MySQL

kamu

What is the user name and password for MySQL
« on: November 02, 2005, 05:49:23 PM »
I am trying to setup Mambo on an Information bays that I have setup in SME 6.01. It require a password and user name to create a database. I have used 'root' and my password at SME setup but failed. I have also used 'admin' and my SME setup password and failed. Is there a different passwors and user name for the MySQL server? What are they?

Black

What is the user name and password for MySQL
« Reply #1 on: November 02, 2005, 06:16:44 PM »

boss_hog

What is the user name and password for MySQL
« Reply #2 on: November 02, 2005, 08:27:33 PM »
Hey kamu,
what Black has suggested may help.
But I feel the better way to approach the PHP/MySQL/CMS
 stuff, is to create a new database for Mambo(mamdb),
the create a new user(mamuser) with full privileges to
"mamdb" and a password for "mamuser" (mamuser_password).

This will get you the functionality for Mambo,
and not expose the "root" account and password to
the webserver or website.

If you are not comfortable to work at the command
line with SQL, there are some great PHPMyAdmin contribs
around to help make things easier.
Good luck.
Joe

Offline Deamon

  • **
  • 22
  • +0/-0
What is the user name and password for MySQL
« Reply #3 on: November 02, 2005, 11:17:40 PM »
kamu,

Quote
But I feel the better way to approach the PHP/MySQL/CMS stuff, is to create a new database for Mambo(mamdb), the create a new user(mamuser) with full privileges to "mamdb" and a password for "mamuser" (mamuser_password).


what boss_hog means is:

Start mysql from the command prompt, the red part needs to be changed to fit your config!
Don't forget the ; and ' !!!

[root@test]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 3.23.36
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql> CREATE DATABASE your_database;
Query OK, 1 row affected (0.10 sec)
mysql> GRANT ALL PRIVILEGES ON your_database.* TO your_user@localhost IDENTIFIED BY 'your_password';
Query OK, 0 rows affected (0.16 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.06 sec)
mysql> quit
Bye

regards,
Ronald


[/quote]
......

Black

What is the user name and password for MySQL
« Reply #4 on: November 03, 2005, 03:42:17 AM »
All I know is that I created a database and did the username/password thing and I got fucked and couldn't log back in until I found that link I posted and it reset everything thank god.

Offline Boris

  • *
  • 783
  • +0/-0
What is the user name and password for MySQL
« Reply #5 on: November 03, 2005, 07:35:47 PM »
Mr. Black,
You may want to watch the language used in your posts.
This site encourage (and enforce if needed) courteous and professional attitude.
...

Offline Deamon

  • **
  • 22
  • +0/-0
What is the user name and password for MySQL
« Reply #6 on: December 02, 2005, 09:03:40 PM »
Glad i could help :-D
......

alejandro

What is the user name and password for MySQL
« Reply #7 on: December 09, 2005, 02:44:25 AM »
you can install phpmyadmin (from somewhere in contribs) and give it a try, It is very easy (web gui based) and saves most of typing mistakes and of course saves time
cheers

artful

What is the user name and password for MySQL
« Reply #8 on: January 22, 2006, 08:40:41 PM »
I'm having this type of problem.
I have created a new database and used both the methods mentioned in this thread.
And still I cannot connect to mysql. it is clearly visible with phpmyadmin.

I'm trying to install xoops.....
if I use admin as a mysql user it create the database but cannot connect.
if I use the new dbase user it cannot create the database nor connect.

my searches of this forum have not given me the answer, can someone else??

Garfield

What is the user name and password for MySQL
« Reply #9 on: January 23, 2006, 08:24:20 AM »
Hi,

By default MySQL is set to accept only local connections.
Thus any connection not originating from the SME box itself will fail by default.

You can change this by giving following commands:

Code: [Select]
# /sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
# /sbin/e-smith/expand-template /etc/my.cnf
# /etc/rc.d/init.d/mysqld restart

This worked flawlessly on my SME 6 system. On my SME 7.0Pre1 system the mysqld restart reported errors, but mysqld was started again.
Just to be sure I rebooted the whole box and everything worked just fine after that.

You don't need the password for the root user in MySQL. If you connect to MySQL as Linux user root on the command line on the SME box itself, you are automatically logged in as MySQL user root in MySQL.
(These are two different users, with different passwords ! The password for MySQL user root is set automatically and you should not mess with it or other things in SME will faill).

From there it is easiest to create a new MySQL user admin with all rights.
Then you can use this user to do your MySQL-admin work.

I create this user admin as follows (from within MySQL):

Code: [Select]
GRANT ALL ON * TO admin@localhost IDENTIFIED BY “password” WITH GRANT OPTION;
GRANT ALL ON * TO admin@”%” IDENTIFIED BY “password” WITH GRANT OPTION;

Note that the second command is very important if you want to remotely connect to MySQL as this user. It says that user admin can connect from any host.

For Mambo / Joomla, there is no need to create a user that can connect remotely, so a "user@localhost" is sufficient.

BTW: Last weekend I installed Joomla 1.07 in the primary ibay and it works great. There are some minor tweaks to do on the file permissions and the session.save_path in PHP.ini, but in a test environment I was able to get everything working alright.