MySQL - phpMyAdmin

Discussion in 'Databases' started by Jose, Aug 20, 2010.

  1. With the new release of our MySQL Database, I'm sure a lot of people would like to use phpMyAdmin, which is a common tool used for managing your database through the browser. While we can't provide this tool ourselves, you're able to actually install this into your own hosting account using these steps.

    1. Create a MySQL Database

    First and foremost, you need a MySQL database so you can connect to it. If you haven't already created it through the CP, check out the KB article we have on how to create it, here:

    http://support.Winhost.com/KB/a830/how-to-create-a-new-mysql-database.aspx

    2. Uploading phpMyAdmin

    First we'll have to download phpMyAdmin. I usually just get the ZIP file, since it's probably the most compatible version across all systems.

    After you download it, you will unzip it so it's ready to be uploaded.

    When connected through FTP, create a folder called "phpMyAdmin" (you can actually name it whatever you want), and upload all the contents from the unzipped phpMyAdmin to this folder you just created in your web space.

    3. Changing Configuration

    After it's been uploaded, we'll have to change a configuration file.

    Locally, open the file "config.sample.inc.php" where you'll change the following line:

    $cfg['Servers'][$i]['host'] = 'localhost';

    to

    $cfg['Servers'][$i]['host'] = 'MYSQLHOST';

    Obviously, you'll have to change 'MYSQLHOST' to be whatever your MySQL Server address. You can find your server address is by going in the CP to the Sites tab > (manage your domain) > MySQL button. If you select Manage next to your database, you'll see the Database Server, which is your server address.

    For example, if your database server is 'my01.Winhost.com', your configuration change will look like:

    $cfg['Servers'][$i]['host'] = 'my01.Winhost.com';

    Make this change on the local file, and save it as "config.inc.php" (previously "config.sample.inc.php"). Once saved, upload it to the phpMyAdmin root folder where the rest of the files are.

    4. Connecting

    Since now phpMyAdmin will be upload and pointed to your MySQL Server, all you have to do is browse the URL (eg. http://domain.com/phpMyAdmin/ ) and you'll be asked for the username and password. Put in the database username and password, and this will allow you to view your database.

    5. Security

    We strongly encourage our customers to password protect their phpMyAdmin directory, to make sure they're the only ones able to connect through it. This can be achieved by following the steps provided in this KB article:

    http://support.Winhost.com/KB/a671/password-protecting-directories-in-iis-7.aspx


    Try it out, and if you have any questions or problems, be sure to post them.
     
  2. I've tried installing phpMyAdmin. I uploaded it fine and put the mySQL host in the config. However, when i now try to log in with my mysql user/pass. i get this message at login:

    Cannot load mcrypt extension. Please check your PHP configuration.

    Any ideas?
     
  3. Ray

    Ray

    What do you have in your config.inc.php file? Are you trying to encrypt the database connection to the MySQL server? I'm afraid we do not support encrypted connection to the MySQL server.
     
  4. I downloaded phpMyAdmin directly from the website, edited the config.inc.php as per above instructions.

    However, I am able to log in now. I thought the mcrypt error was stopping me from logging in so I changed my password and i'm able to log in now.

    Anyone installing phpMyAdmin needs to also set this line as phpMyAdmin will ask for it later:

    $cfg['blowfish_secret'] = '';

    The 'Cannot load mcrypt extension. Please check your PHP configuration.' message still shows up, not sure if it stops phpMyAdmin from functioning properly though.
     
  5. Ray

    Ray

    The error 'Cannot load mcrypt extension. Please check your PHP configuration.' is a different error all together. Your application is trying to encrypt the connection which I'm afraid we do not support.
     
  6. Has anybody at all gotten this to work? Not having mcrypt on a 64bit machine makes it fail according to phpmyadmin docs. "MCrypt (highly recommended for performance when using the cookie authentication method, and actually required for 64-bit environments)"
     
  7. Ray

    Ray

    No we got this to work. Try not to enable mcrypt on your PHP.
     
  8. tat mean Winhost does not support phpmyadmin? mean we cant apply admin login in our website?
     
    Last edited by a moderator: Oct 14, 2015
  9. Ray

    Ray

    I don't quite understand what you are trying to say. Yes phpmyadmin works on our server. What exactly is your problem?
     
  10. I downloaded phpMyAdmin directly from the website, and edited the config.inc.php


    then upload the phpmyadmin to my server, but when i try to login, this show out '#2005 Cannot log in to the MySQL server'

    another problem is , the bottom of the login bar show ' Cannot load mcrypt extension. Please check your PHP configuration.'

    anyidea how to solve it?
     
  11. Ray

    Ray

    Make sure you are typing the MySQL db login that the Winhost control panel made for you. Log into your Winhost control panel and go to the Site Manager/MySQL. From there you will see the MySQL server name, the db name, and the MySQL login. Make sure you type the MySQL login that you see on that page. If you do not remember the password reset it to something you know. Also make sure you update the config.inn.php and that you are pointing to the correct MySQL server we gave you.

    We do not support mcrypt. This is disabled on the server. What you are seeing about mcrypt is only a warning and will not hinder phpmyadmin when you try to use it.
     
    Last edited by a moderator: Oct 14, 2015
  12. to ray

    thx a lot for your explanation. but i still can't login ..

    in the config,inc code i change to---

    $cfg['Servers'][$i]['host'] = 'my01.Winhost.com ';

    it's right?

    can i send my login detail for u to check it out what's the problem?
     
    Last edited by a moderator: Oct 14, 2015
  13. Ray

    Ray

    Email it to me on the forum. Or if this is simply a test db then yeah you can send me your db login and password and I'll test it out for you. You'll also need to give me a URL to test.
     
  14. yeah thx a lot

    here this my login detail.

    FTP Username: sugarbab
    password : [seriously, people, don't post your passwords...]

    Database Name: mysql_14332_sugarbab
    Database Server: my01.Winhost.com
    Database User: 0007942

    your help will be deeply appreciate.

    thank
     
  15. Ray

    Ray

    I just noticed this...

    $cfg['Servers'][$i]['host'] = 'my01.Winhost.com ';

    There's a space on 'my01.Winhost.com ';

    Take out that space and try it.
     
    Last edited by a moderator: Oct 14, 2015
  16. ops.. really sorry for that.. thank for telling, i try it again..X.x:eek:

    thank a lot finally, i successfully enter to phpmyadmin.

    thank for your great help
     
  17. Ray

    Ray

    Don't forget to password protect the directory so you add a layer of security to it. And add index.php as one of your startup page. You do this through IIS 7 Manager. Refer to this kb article for instructions on how to configure IIS 7 Manager to connect to our server.

    http://support.Winhost.com/KB/a628/using-the-microsoft-iis-70-manager.aspx

    Once connected go to the icon Default Docs and type index.php on the list.
     
    Last edited by a moderator: Oct 14, 2015
  18. Hi,

    I'm having the same problem, unfortunately. :/

    Two error messages: "#2003 Cannot log in to the MySQL server" and also "Cannot load mcrypt extension. Please check your PHP configuration."

    Host name in config.sample.inc.php set to:
    $cfg['Servers'][$i]['host'] = 'my01.Winhost.com';

    I tried original db password (was connecting ok to wordpress with settings in wp-config.php) and then changed the password through cp as per posters advice. Tried logining in with new password but same errors. (I updated wp-config.php with the new password also and this is connecting fine to the db).
    Not sure what else to try.

    I'm trying to get this working so when I move wordpress to a production server I will be able to run a dump on the MySql db. I'm assuming if I get phpmyadmin connecting OK then this is a task I'll be able to carry out?

    Thanks,
    Clover
     
    Last edited by a moderator: Oct 14, 2015
  19. Ray

    Ray

    Did you read the postings on this thread? Here is a copy of my response about mcrypt.

    We do not support mcrypt. This is disabled on the server. What you are seeing about mcrypt is only a warning and will not hinder phpmyadmin when you try to use it.

    As for your login, make sure you typed the server name correct in the config.inc.php file. Remember spaces and misspellings can cause you not to log on correctly. Plus make sure you type the correct db login and password. You have two databases on the Winhost account, one is MS SQL 2008 and the other is MySQL. Make sure you are typing the MYSQL db login and password. If you are unsure of the password for MySQL I suggest you reset it.
     
    Last edited by a moderator: Oct 14, 2015
  20. Yes; I read the postings three times in case I had missed something. I was just stating the error messages as I am seeing them.

    I will continue to reset, rewrite and chant. Thanks.
     
  21. oops, I should've read it four times.
    I hadn't renamed config.sample.inc.php to config.inc.php.
    It's working now.
    Thanks :)
     
  22. The devil is in the details, clover! Glad you worked it out.
     
  23. disable mcrypt warning

    To disable the mcrypt error you get add this to your config.inc.php file

    $cfg['McryptDisableWarning'] = true;

    Winhost dont support it so the only thing you can do is hide the warning or leave it and live with it.
     
    Last edited by a moderator: Oct 14, 2015
  24. Ray

    Ray

    That's a useful posting. Thanks.
     
  25. Jose's basic rules for installing PHPmyADMIN are mostly correct.

    One Very common error when installing ANY application via FTP to Winhost is to check all file permissions.

    By default PHPmyadmin is READ-ONLY.

    Insert at the end of item 3. Check file permissions enable read, write and execute. set to 777 before attempting to connect to PHPmyADMIN.

    If you are going to accept credit cards on your website, change:

    * This is needed for cookie based authentication to encrypt password in
    * cookie
    */
    $cfg['blowfish_secret'] = ' '; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

    /*
    * Servers configuration



    TO:

    * This is needed for cookie based authentication to encrypt password in
    * cookie
    */
    $cfg['blowfish_secret'] = 'gateway'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

    /*
    * Servers configuration

    gateway = the name used by your payment provider.


    Note: Cookies need to be enabled for most payment modules to work.

    Tip: If you get an error message like 404, not much information is given about the error. You can easily change this in Internet Explorer to a more verbose description of any error codes.

    In IE browser: Menu> Tools> Internet Options> Advanced. Find and UN-CHECK line: Show friendly HTTP error messages.

    • Mcrypt path would need to be set in Winhost's PHP.ini. Apparently this is disabled or the path is not set.
    • Mime_Magic may be turned off in Winhost's PHP.ini settings. To manually set this: In IIS find listing MIME Types. ADD> Extension .php and set MIME Type to Text/HTML, entry type Local.
     
  26. 777 is a UNIX permission and is not applicable to a Windows server.

    Also, phpMyAdmin has nothing to do with taking credit card orders on your site, so all of that is irrelevant...
     
  27. Parse error: syntax error, unexpected '@' in E:\web\ishpejt1\phpMyAdmin\libraries\common.inc.php on line 467

    i have this error after i change the
    $cfg['Servers'][$i]['host'] = 'localhost';

    to

    $cfg['Servers'][$i]['host'] = 'MYSQLHOST';

    and upload i get this error please can you help me

    thank you
     
  28. Have you literally changed the line to:

    $cfg['Servers'][$i]['host'] = 'MYSQLHOST';

    ?

    If so, you have to enter the server name in there. Like: my01.winhost.com, my02.winhost.com, etc. You can find that server name in Control Panel.
     
  29. yes i did it the same as you write it here. this is what i cant understand

    the error is like this

    Parse error: syntax error, unexpected '@' in E:\web\ishpejt1\phpMyAdmin\libraries\common.inc.php on line 467
     
  30. That won't work (neither will "localhost" - not here, anyway). You have to have a hostname in that $cfg['Servers'] line.

    As for the error, there's nothing in the installation or setup of phpMyAdmin that would alter \libraries\common.inc.php, so I would suggest downloading the package again and replacing that file (or all the files except config.inc.php) and seeing if you still get the error.
     

Share This Page