Child pages
  • Troubleshooting MySQL Class Database Problems
Skip to end of metadata
Go to start of metadata

Several SICE classes use MySQL databases hosted on the SICE MySQL server db.sice.indiana.edu.  Every semester, we get a flurry of requests for help from student who are unable to access their database.  This page is a collection of common problems and the resolution to help you solve your database access problems.


  1. Forgotten Password - One of the first things you should do with your database is change the default password.  Unfortunately, for some students the second thing they do is forget the new password they just set.  Before you ask to have the password reset to the default, you can check your mysql history file and see if the password change line is there.  You can do that by running this command on silo:

    grep -i password ~/.mysql_history*

    There may be multiple password change lines so try every password in the list to see if you can get access.

    If you successfully used the new password but don't see it in the mysql history file, it may be in your command line history.  You can see the mysql commands you have run previously as follows:

    grep mysql ~/.bash_history

    You may see the correct password in one of the --pass arguments to the mysql command.

  2. Incorrect --pass Argument Syntax - When you specify the database password on the command line, you use the --pass argument.  The proper syntax of this argument is:

       --pass=your-password-here

    So, if your new password is "foobar1984" you would use:

        --pass=foobar1984
  3. Extra Spaces In the --pass Argument  - When you are using the --pass argument, you must not have any spaces.  Do not put spaces before or after either of the hypens or equal sign.

  4. Passwords With Spaces - There is no reason you can't set a password with spaces.  However, if you do that you will have to take care and quote the password if you are using the --pass argument.  For example, if your password is "my password with spaces" you would use:

        --pass='my password with spaces'

    You can also just use the -p argument and eliminate the --pass argument completely.  If you don't use --pass and use -p then you are prompted for the password.  When prompted you can just enter your password, complete with spaces, without any problem.

  5. Special Characters In Password - There are some characters that have special meaning to the Linux shell and may cause you trouble if you have them in your MySQL password.  Some that will be problematic are the following:

         < > & ! ; ' " \ ? $ ~ |

    The best advice is to just not use these in your password in the first place.  However, if you have already changed it and it includes one of these characters you can still get in.  There are several ways around this problem and quoting the password as in the previous item (Passwords With Spaces) or you can just use the -p flag instead of --pass and type the password at the prompt.  When you get prompted for the password then you can enter a password with any of these special characters.

  6. Incorrect hyphen characters - For all arguments to the mysql command, you will use the standard ascii hyphen (-).  Some arguments use a single hyphen (like -u and D) and some use 2 hyphens (like --pass).  However, we have seen several cases where the hyphen caracter is cut/pasted from a web page and it turns it into a different hyphen character.  The problem is that this "fake" hyphen looks nearly identical to the correct hypen (although it may look a little longer).  So, you should re-type the command instead of just cutting/pasting it from a web page to make sure you have the proper hyphen.

  7. Incorrect Database or Username - You will receive a database name and a MySQL account username from your instructor.  In most cases, the database name and the username will be the same and of the form c123f18_username where "c123" will be your class (eg. i308) and the "f18" will indicate the semester and year (f=fall, s=spring, u=summer).  Also, the "username" will be your official IU username.  So, if your username is "janedoe" and you are in i308 in the Fall 2018 semester, your database name and MySQL username will be "i308f18_janedoe" so verify that you are using the correct values.  Note that you will NEVER log into mysql using your IU username and passphrase.  You will use your IU username and passphrase to log into a linux system like silo (aka burrow) but, once logged into the server, you will not use that to log into your mysql database.

  8. Syntax and Typing Errors - Many of the problems students have are just simple typing errors.  The mysql command you have to type is relatively long and there are lots of ways to type it incorrectly.  So, go back to the class notes and VERY CAREFULLY compare what you are typing with what is in the examples.


If you have gone through all of these steps and are still having trouble, you are urged to first check with your instructor or AI.  They have experience working with MySQL and may see a problem you are having.  If you still aren't able to resolve the issue, then please let us know.


  • No labels