Connecting Tech Pros Worldwide Help | Site Map

Obtaining mySQL account information

Member
 
Join Date: Sep 2007
Posts: 52
#1: Sep 25 '08
Hi,

I am new to mySQL just now installed Drupal, a CMS that runs on PHP and mySQL on my apache server (XAMPP).

While trying to install the Drupal, I was required to provide the Database name, database username and the password.

I only remmeber the password but not the database username. Is there command that once upon loggin into MySQL command line that I can obtain my username and tha name of any databases i created earlier?

I can log in comfortably into MySQL since it only asks for my password. But I need the username for Drupal. I have installed MySQL a while ago which is why I dont remember the login details clearly.
numberwhun's Avatar
Site Moderator
 
Join Date: May 2007
Location: New Hampshire
Posts: 2,566
#2: Sep 25 '08

re: Obtaining mySQL account information


Well, first, mysql should have a root account. The first thing you should do is set the password in mysql for the root account as right now it won't have one by default. Then, you can set your password if it isn't already done.

To see a list of all the databases, you need to use the command:
Expand|Select|Wrap|Line Numbers
  1. show databases;
  2.  
Unless your account has privileges on the database you mentioned in the Drupal install (I assume it created it, but could be wrong), then you might not be able to see it.

Regards,

Jeff
Reply