phpmyadmin problem

Discussion in 'Installation/Configuration' started by jamesls, Jul 22, 2009.

  1. jamesls

    jamesls New Member


    I have ubumtu 8.10, and ispconfig 3 installed.

    The problem I have is phpmyadmin won't let me enter a user name or password.

    The rest, web mail, stats etc appear to work fine.

    I have tried www.SiteName/phpmyadmin & IPAddress:8080/phpmyadmin.
    both come up with the same error...

    Welcome to phpMyAdmin

    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

    MySQL said:

    #1045 - Access denied for user 'root'@'localhost' (using password: NO)

    I've tried it on the PC running ubuntu as well as from other machines.

    None of my sites have any databases.
    The user root has a password set

    I can't seem to find the login page for phpmyadmin. How do I run phpmyadmin so that I can log in with a user name and password.

  2. jamesls

    jamesls New Member

    partly Solved

    I changed my password for mysql using mysql Admin to a blank password.

    I can now log into phpmyadmin as root user.

    My next question is how do I use a password for the root user, and have it work with ispconfig.

    I've tried to set up 2 databases from within ispconfig (sites > databases) and they dont seem to be showing up with phpmyadmin.....
    The users I created when setting up the databases don't seem to be appearing either ....

    In the client settings both accounts were I'm trying to set up databases are set as -1 for max number, and php is set to modphp elsewhere.

    I guess I'm doing something wrong but can't figure out what

    any help would be greatly apreciated
  3. dzudzu

    dzudzu New Member

    i think because u blanked out root password ispconfig can't connect to database, imo you could quickly do update of ispconfig and then set corrent hostname/user/pass for db access.

    also check that if it isn't working again, that you add ability for user to be able to connect from the specific hostname with -h command when u first created mysql user. Check up perfect install guide on this and you'll see what i talk about.
  4. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Looks more like you missed configuring phpmyadmin the right way.
    Just change the config file to authenticata e.g. via cookie, then it will present a login-screen. I'd never use hard coded pws in such software.

    Using a blank mysql root pw is really bad. Strange that mysql allows that at all...
  5. jamesls

    jamesls New Member

    thank you for the replies.

    I can now get into phpmyadmin, from within ispconfig.
    I can't seem to be able to create databases from with in ispconfig.
    I goto Sites > Databases > add new database, then fill out the boxes.
    ISPconfig shows the database in the list of databases. I click the icon to run phpmyadmin and that runs ok, but starts up as the root user, not he user name I used for trying to create it.
    When I look for the database, it does not appear, and as far as I can tell the newly created database does not exist.

    I'm don't realy know where to start trying to figure out why ispconfig is not creating the databases.

    I've tried looking at some of the log files and all I can find is this in the system log
    2009-07-25 20:56 Error Unable to connect to the database
  6. dzudzu

    dzudzu New Member

    reading what u said i tihnk u have changed your root/mysql password and the ispconfig doesn't know about it. Simpliest way is to run upgrade script for ispconfig and have it configured again.

    before doing that, check if u can make like ftp or ssh user and does it work, if it doesn't work i bet thats your problem
  7. jamesls

    jamesls New Member

    I tried creating a new ftp client for an existing site and it works ok, I didn't try an SSH user - maybe a dumb question but whats an SSH user...

    I also upgraded ispconfig the other day it ran ok with no errors.

    In the past ispconfig has worked ok and created a database, but I deleted it as it was just a quick test.

    I did change the admin pass word for mysql, but not through ispconfig, I have since changed it back to a blank one, which is how I configured it with ispconfig originaly.

    Thanks for your help
  8. jamesls

    jamesls New Member

    So far, its still not creating databases.
    I can create FTP users.
    I tried running update again but it says there are no updates avaiable.

    Any database I create using ispconfig, shows up in the database list within ispconfig OK.
    I had a look at the database dbispconfig, this contains 44 tables, one of which - web_databases has the records for the databases In this table its showing the right info for the newly created database, I think ....

    I'm starting to wonder if its just me not doing something correctly, what settings do I need for php & suexe, also in the table web_databases it has a feild for system group ? (sys_perm_group) that value = ru ???? I don't have any groups called ru...

    Should I create a user for the new database I want to create before I use the database screen within ispconfig.
    Should the user be a member of a particular group such as admin?

    I also recieve an error in the system log within ispconfig that says it can't connect to the database - its the same error I listed above.

    What log files should I be checking for more details

    many thanks james
  9. Leszek

    Leszek Member

    You can run:
    to tighten things up.
  10. jamesls

    jamesls New Member

    Thanks :)

    I will tighten things up and change the password for mysql once I can get it to work with ispconfig.

    What Till said about not hard coding user names & passwords has made me wonder how you can pass login info to mysql. So far I just create a web user with minimal privleges and put that in the connect to database statement within my php scripts.

    At the moment my server security isn't what concerns me.
    My problem is that I can't make databases from within ispconfig.

    Once everything is running ok I'll start tightning things up, but for now I want to try and keep things simple and strieghtforward, I don't want to cause myself more headackes and problems.

    Again thanks for your advice,
  11. dzudzu

    dzudzu New Member

    what i mean is, when u create ftp user, log in with phpmyadmin into you mysql, go to ispconfig db and then locate table ftp_user, click on it, and then select tab BROWSE and see if the new ftp user is created there.

    If it is then your ispconfig is able to use mysql database.

    Then i would sugest that you go to home, go into mysql database, locate table user, browse again and edit ispconfig user and grant him privilidges.
  12. jamesls

    jamesls New Member

    I had a look at the mysql databases.

    The FTP user is created in "dbispconfig.ftp_user" and all the values look ok.

    The FTP user is not being created in the "mysql.user" table.

    Also I only have 3 users within mysql.user table, root, debain-sys-maint, and ispconfig.
    Root and Debbain-sys-maint have all privliges
    The ispconfig user has no privleges ????

    Is the user "ispconfig" the main user, I was thinking if it has no privliges it won't be able to do anything.

    I've not changed anything yet, and will wait for your opinion, but I think we are getting close to solving it :))

  13. Ben

    Ben ISPConfig Developer ISPConfig Developer

    everything ISPConfig creates will be in any table of the database dbispconfig.

    the table "user" in the mysql database itself is for mysql's user handling.
  14. dzudzu

    dzudzu New Member

    ok, i still belive u should do this:

    go to ispconfig folder from where you installed it. So it would be something like /tmp/ispconfig3_install/install

    in there do:

    php -q update.php

    After you complete that, try making new db again.
  15. jamesls

    jamesls New Member

    I had quick look for the ispconfig in the tmp dir but could not find it, so I ticked all the boxes relating to php in the package manager and told it to reinstall, No change still does not work.

    If you could have a look at the "mysql.user" table and let me know if the user "ïspconfig" has any preivliges that may be helpful.

    I will have another look tonight when I have more time for the installation path and try the upgrade from there.
  16. dzudzu

    dzudzu New Member

    hehe well if you don't have it there just downlaod it again and extract the archive, in there you should have folders like i told u, and no it don't have any privilidges

    so, download ispconfig again, extract and locate the folder install and there you should have file update.php

    so run it with php -q update.php
  17. jamesls

    jamesls New Member

    Many Thanks dzudzu

    When I red it the first time I was in a rush and it sounded like upgrade PHP, hahaha,

    I worked ok when I followed your second msg.

    Now I have a couple more brain dead questions ...
    1. How do I change the mysql root password so that ispconfig will still work

    2. Ben mentioned something about not hard coding usernames and passwords, I don't understand how you can do that.

    The way I was going to do it in my php script was to use a connect statement ... connect localhost, user, password... the only other way I can think of doing it without hard coding it into a script would be to use the php config file - not something I've thought of before.

    Also I'm a little puzzled about mysql users, I figure a web user will need select, update, and insert privliges. I tried running my script with less but that seems to be the least I can get away with for saving session info.

    The user conection thing of localhost, specific host, or any host. if a web user connects from any ip / host and I want him to be able to run my script, do I have to give the user ány host' rights, as the php script is on the local web host will it work with just localhost for the mysql user.

    Amyway thanks once again for all your help, without it I think I would have reinstalled the whole lot again

    THANKS !!!!! :))))))
  18. dzudzu

    dzudzu New Member

    Hello man, i was away for few days so didn't reply.

    Well the most simple way is to do upgrade ispconfig again same as you did now.

    Another way is: Well what i would do is create another user and give him all privileges in admin same as root and then again follow instructions but when you need to type root username for mysql type your new username and the password for that user.

Share This Page