Difference between revisions of "Dept. MySQL Server"

Line 3: Line 3:
 
You will need a [[Obtaining CS MySQL Accounts|CS '''''MySQL''''' account]] for access.   
 
You will need a [[Obtaining CS MySQL Accounts|CS '''''MySQL''''' account]] for access.   
  
:('''Note:'''  ''[https://support.cs.jhu.edu/wiki/Dr_Yarowskys_MySQL_Class_Dbase_Service Dr. Yarowsky's Database Class''] uses a completely different MySQL server, ''dbase.cs.jhu.edu.''    If you are taking his class, you will need to get account info from your TA.)
+
:('''Note:'''  ''[[Dr Yarowskys MySQL Class Dbase Service|Dr. Yarowsky's Database Class]]'' uses a completely different MySQL server, ''dbase.cs.jhu.edu.''    If you are taking his class, you will need to get account info from your TA.)
  
 
Once you have a CS '''''MySQL''''' account, you can connect to the server with:
 
Once you have a CS '''''MySQL''''' account, you can connect to the server with:
  
:<code> mysql -u ''your-mysql-username'' -p -h mysql.cs.jhu.edu
+
:<code>mysql -u ''your-mysql-username'' -p -h mysql.cs.jhu.edu</code>
  
 
You will be prompted for your MySQL password.
 
You will be prompted for your MySQL password.
  
=='''UPDATE:''' Users of our CS MySQL service must change their MySQL passwords by Dec 31, 2019... ==
+
== Changing Your MySQL Password ==
  
Several of you utilize our MySQL services by accessing our MySQL server, mysql.cs.jhu.edu.  We will soon be upgrading to a later version of MySQL, and that version handles its password storage format differently than in the past.
+
MySQL passwords are separate from the passwords for our [[:Category:Linux Clients|Linux clients]]; changing your Linux password will not change your MySQL password (and vice versa).
  
In preparation for the upgrade to the database server software on mysql.cs.jhu.edu, we need everyone with a MySQL account on that server to change their MySQL passwords (not their Linux passwords to our servers in general... only change your MySQL password '''if you specifically use our mysql.cs.jhu.edu MySQL server'''.)
+
To change your MySQL password, connect to mysql.cs.jhu.edu with a MySQL client, and run the following command:
  
To make that change, connect to mysql.cs.jhu.edu with a MySQL client, and run the following command:
+
SET PASSWORD = PASSWORD('your-new-password');
 
 
    SET PASSWORD = PASSWORD('your-new-password');
 
  
 
Replace ''your-new-password'' with what you want your password to be.
 
Replace ''your-new-password'' with what you want your password to be.
  
 
Please be aware that many MySQL clients keep a record of SQL queries.  You should clear that record to keep your MySQL password safe.  On Linux systems, the command line MySQL client keeps its statement log in ~/.mysql_history; we recommend removing that file after changing your MySQL password.  Other clients may store their history in other places.
 
Please be aware that many MySQL clients keep a record of SQL queries.  You should clear that record to keep your MySQL password safe.  On Linux systems, the command line MySQL client keeps its statement log in ~/.mysql_history; we recommend removing that file after changing your MySQL password.  Other clients may store their history in other places.
 
Please plan to change your MySQL password by December 31st, 2019.  After that date, anyone with an unchanged MySQL password might not be able to log into the MySQL system.  If you're not able to log in, you'll have to visit the CS IT Support team in-person to have us reset your MySQL password for you.
 
 
:'''NOTE:'''  This password change '''does not''' affect current students using our dbase.cs.jhu.edu MySQL server for Dr. Yarowsky's course.
 
 
Any questions should be directed to [mailto:support@cs.jhu.edu support@cs.jhu.edu]
 
 
 
  
 
[[Category:MySQL]]
 
[[Category:MySQL]]

Revision as of 18:40, 22 June 2020

The CS Dept has a MySQL server available. Point your MySQL client to mysql.cs.jhu.edu

You will need a CS MySQL account for access.

(Note: Dr. Yarowsky's Database Class uses a completely different MySQL server, dbase.cs.jhu.edu. If you are taking his class, you will need to get account info from your TA.)

Once you have a CS MySQL account, you can connect to the server with:

mysql -u your-mysql-username -p -h mysql.cs.jhu.edu

You will be prompted for your MySQL password.

Changing Your MySQL Password

MySQL passwords are separate from the passwords for our Linux clients; changing your Linux password will not change your MySQL password (and vice versa).

To change your MySQL password, connect to mysql.cs.jhu.edu with a MySQL client, and run the following command:

SET PASSWORD = PASSWORD('your-new-password');

Replace your-new-password with what you want your password to be.

Please be aware that many MySQL clients keep a record of SQL queries. You should clear that record to keep your MySQL password safe. On Linux systems, the command line MySQL client keeps its statement log in ~/.mysql_history; we recommend removing that file after changing your MySQL password. Other clients may store their history in other places.