Your MySQL user name and password was emailed to you when you first received an account on LAMP. Please refer to your .my.cnf file if you have forgotten your password.
Table of Contents
- Accessing MySQL using phpMyAdmin
- Passwordless Access through the command line
- Accessing MySQL using the Command Line
- Changing Your MySQL Password
Connecting to MySQL using phpMyAdmin
To access this GUI:
- Visit https://lamp.cse.fau.edu/phpMyAdmin (link will open a new browser window)
- The first prompt will ask you for your FAU Username and Password
- This password is your Canvas/Active Directory/Network Password and not the password you use for SSH or MySQL. This is the same password used to sign into computers in lab. See figure below.
- The next screen logs you into phpMyAdmin GUI. This screen requires your MySQL credentials.
- If you forgot your user name and password to MySQL, look at the email that was sent to you or cat the .my.cnf file in your home directory.
Passwordless Access through the Command Line Interface (CLI)
You should have a file already created for you in your home directory called ~/.my.cnf. Below is an example of this file:
Example: [code lang="bash"] $ cat ~/.my.cnf [client] user="jheithof" pass="1bEoGCs0fQjeR" [/code]
If you don’t have this file create it using your favorite text editor and follow the format above. After you have created the file and saved your changes remember to set the proper permissions so no one else can see it.
Example: [code lang="bash"] [jheithof@lamp ~]$ chmod 600 .my.cnf [jheithof@lamp ~]$ stat .my.cnf File: `.my.cnf' Size: 46 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 4065277 Links: 1 Access: (0600/-rw-------) Uid: ( 637/jheithof) Gid: ( 637/jheithof) Access: 2011-08-05 21:47:30.000000000 -0400 Modify: 2011-06-07 08:42:21.000000000 -0400 Change: 2011-11-18 08:18:23.000000000 -0500 [/code]
Connecting to MySQL using CLI
Once you have logged in through SSH use the mysql command to connect to the MySQL server. If you have setup passwordless access (see above – all new students have this setup automatically by TSG) you simply call mysql command with the name of the database you want to connect to. By default students are given a database with the same name as their login id.
Example: [code lang="bash"] $ mysql jheithof Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 103504 to server version: 5.0.27 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show tables; +----------------------+ | Tables_in_jheithof | +----------------------+ | BoardPages | | BoardSections | | VisitorLocations | | mw_archive | | mw_category | Some rows have been taken out to safe space | users | +----------------------+ 42 rows in set (0.00 sec) mysql> [/code]
Changing Your MySQL Password
- SSH into lamp.cse.fau.edu
- Connect to MySQL using the command line
- Run the SET PASSWORD command from the MySQL command line shell prompt.
- Type exit hit enter
[code lang="bash"] $ mysql jheithof Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 103504 to server version: 5.0.27 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SET PASSWORD = PASSWORD('SXsYPSg+tH'); Query OK, 0 rows affected (0.00 sec) mysql> exit Bye [jheithof@lamp ~]$ [/code]
- Update ~/.my.cnf using your favorite text editor