ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


MySQL password for version 41 and up


  • 2005-08-18 13:04:46

    MySQL password for version 41 and up

    ATutor version: 1.5

    If you are trying to install ATutor 1.5 on a system using MySQL versions 4.1 and up, and you have created a specific account for your ATutor application to use when connecting to the db, you have probably discovered that ATutor will not connect to the db.

    MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by ATutor. To solve this problem, create (or modify) the account password by resetting the password to pre-4.1 style. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

    mysql> SET PASSWORD FOR -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

    Alternatively, use UPDATE and FLUSH PRIVILEGES:

    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') -> WHERE Host = 'some_host' AND User = 'some_user';
    mysql> FLUSH PRIVILEGES;

    Substitute the password you want to use for newpwd in the preceding examples. MySQL cannot tell you what the original password was, so you'll need to pick a new one.

    Maybe in future versions of ATutor some code changes will ensure this is no longer a catch :-) .

  • 2005-08-18 13:17:43

    .

    I'm not sure what you are referring to. ATutor does not store the password in any MySQL specific way. It uses whatever password is supplied. It's up to the person installing ATutor to ensure that the username and password for MySQL are valid and allow ATutor to create the database (if it doesn't already exist).

    ATutor is not able to create such MySQL accounts for you, nor is it able to flush the privileges.

  • 2005-08-18 13:50:56

    .

    I came across this problem after entering my password during the ATutor installation process.

    The connection of the client [ATutor] to the database could not be established until I updated the password in the 'mysql' db (I am speaking of the db in mysql called 'mysql'), using the OLD_PASSWORD() function that I mentioned.

    Authentication is managed by checking DB_USER and DB_PASSWORD (defined in the '/include/config.inc.php' file against information in the 'user' table of the 'mysql' db.


    All that this means is that probably ATutor is using the 'old' password hashing method, not the new one now present in MySQL versions 4.1 and above.

    Hopefully this makes things a little clearer.

    Cheers.

  • 2005-08-18 14:08:04

    .

    ATutor doesn't store the hashed password. It sends the password to the MySQL client as plain text. The client then hashes the password to match wathever scheme MySQL is using.

    If you are saying that you upgraded your MySQL installation to 4.1 and that ATutor would no longer connect using that account, then neither would any other application or client.

    4.1 requires you to run a password update script.

    So this isn't actually an ATutor problem, it's part of the MySQL upgrade.

  • 2005-08-19 05:29:28

    .

    As a matter of fact the 'problem' connecting to MySQL ≥ 4.1 lies with php.
    Here are some quotes from http://fr3.php.net/mysql
    -----------------------------------------------------------------------
    Pat
    23-Jan-2004 12:02
    "The password hashing was updated in MySQL 4.1, you must use the MySQLi extension with MySQL 4.1+ (or use the following method to allow pre 4.1 clients to connect).

    MySQL 5.0 has a new password system, and PHP cannot connect to it because it cannot send a correct password. You must use the MySQL command OLD_PASSWORD() when adding a user to the database, or PHP cannot connect as of the library that comes with PHP 5.0Beta3"

    chaoscontrol_hq at yahoo dot com
    23-Aug-2004 11:10
    "In MySQL4.1 and later, the default password hashing format has changed making it incompatible with 3.x clients.
    I found out mysql_connect() works on server versions >= 4.1 when your MySQL user password is blank because password authentication isn't done in that case, otherwise you need to use another connection method (e.g. mysqli).
    Also if you are using old MySQL tables on a new server (i.e. the passwords are stored in the old format), then the server will use the old auth method automatically and this function should work in all cases.
    Hopefully this will help someone, it had me confused for a while because some of the users on my 4.1 server could connect and some couldn't."

  • 2005-08-19 10:22:15

    .

    ATutor does not make use of MySQL 4.1+ specific features and works fine using the existing MySQL library in PHP.

    ATutor does not make use of MySQLi, and is unlikely to do so for some time.

    Again, this is a MySQL client issue, and unrelated to ATutor.