Menu

Can't created database

Help
2007-02-20
2013-04-08
  • Nobody/Anonymous

    Hi,

    I am installing xdbcms on my local machine on and Xampp for windows apache server.

    When I try to login in on the install for the database I get the following error:

    xdbcms - Install version 0.13
    Attempting to create the database...
    NOTE: you will get an error here if you are updating...
    Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'admin'@'localhost' (using password: YES) in D:\xampp\htdocs\xdbcms\INSTALL\database_dump.php on line 14

    Problem: I could not connect to the database. Please check username and password of MySQL root user in XDB_install

    I am using the username and password that I have in PHPMYADMIN for the data base.

    What should I do?

    Thanks,
    Sperry

     
    • Nobody/Anonymous

      Hi Sperry,

      Interesting one that - when you login to phpmyadmin, are you sure that you're logging in as admin@localhost? - one way of getting around the database create is to create it manually, however, I think it might run into the same problem when it tries to create the database tables...

      Here's a thought, try:

      Create a database manually (make sure that the database name is put into GLOBAL_HEADER.php, in the main directory)

      Then create a user manually:

      grant all privileges on <yourdatabasename> to fred@localhost identified by 'barney';

      (change fred and barney as appropriate!)

      This (should) create a user with the appropriate settings - use this user to log into the install routine....

      - Hope that helps - let me know how that comes out....

      Carl.

       
    • Nobody/Anonymous

      Oops - sorry spotted a typo:

      Should be

      grant all privileges on <yourdatabasename>.* to fred@localhost identified by 'barney';

      You might need to double check the syntax - I'm doing this from memory....

      Its worth noting that 'fred@localhost' is not the same as 'fred' in terms of mysql....

      Carl.

       
    • Nobody/Anonymous

      Carl,

      I guess I am not understanding all of this. I only started looking into CMS's about a week ago. I have installed dozens of them. I finally realized that what I wanted to do was have one I could learn to work with that would generate static html files. Seems like yours was the only one I could find that is supposed to do that.

      I don't know php. What I have learned about it has only involved my installing the Xampp which has all the associated packages that use it.

      What do you mean about "fred@localhost identified by 'barney';"? Two different names?

      Presently in MYSQL using PHPMYADMIN I have several databases including one named "xdbcms" all are accessed by user: slruss with a password of: sr54. (This is on my local machine so not worried about giving out this info. I have changed it several times anyhow trying to understand all of this :)

      If you have the time maybe you could give me a step by step about all of this. And concerning changing the global header file.

      Thanks Again,
      Sperry

       
      • Nobody/Anonymous

        Hi Sperry,

        Ok, no problems - quick bit of 'mysql 101'...

        Tables of information are 'owned' by a 'user' - so before any tables (or indexes of information) can be created, you must create a user - this is what you're having problems with...

        Users are identified by a 'user name', and a 'password'. The username can be any set of normal (alphanumeric) characters - the password can be any characters, within reason...

        A username could be 'fred' - which implies that anyone logging into the machine can log in to the database and view/amend etc your data - someone could even log in from another machine and access your data.

        Alternatively a username could be 'fred@localhost' - which implies that you must be logged into the server machine directly - i.e. you shouldn't be able to log in from another machine - this should be more secure for your data.

        If you're running all this in your own machine, behind a firewall, it's moot, but there are other people out there running the system directly on the internet.

        Sooo - you're running windows....

        Do a search for a program called 'mysql.exe'.
        Start up a command prompt (Start->Run... 'cmd')
        'cd' to the directory holding the mysql.exe program (as I suspect its not on your PATH)
        enter:   mysql -u admin -p
        (I'm assuming 'admin' as the master user - its normally 'root' on unix boxes)
        - it'll prompt you for a password
        You should now be at the mysql> prompt.

        Now you need to create your database:

        create database xdbcms;

        And then allow a user all privileges (i.e. create tables etc) on the database:

        grant all privileges on xdbcms.* to mynewusername@localhost identified by 'mypassword' with grant option;

        (all the above is on a single line).

        You should now have a database, with a user that you can use in the INSTALL page, and in the main system.

        GLOBAL_HEADER

        Some users can't dictate what they want the database to be called - so I've put the database name into a configuration file which you can find in the main xdbcms directory, called 'GLOBAL_HEADER.php'. At the top of the file, you should see an entry called application_database ....='xdbcms';

        If you want to use a different database name, simply change the 'xdbcms' to 'whateveryoulike' etc with a text editor (e.g. notepad).

        Please note though - I've given the manual database create instructions above assuming you're using xdbcms.... :-)

        Hope thats useful information....

        Let me know how you get on...

        Thanks

        Carl.

         
    • Nobody/Anonymous

      Sorry, afterthought....

      You're trying to use 'admin' when using the install routine... - are you sure that the master user of mysql is 'admin'? - under linux it's 'root'....

      Carl.

       
    • Nobody/Anonymous

      Okay thanks Carl. I got that going but now when I try to login with the xdbcms install I get this error message:

      xdbcms - Install version 0.13
      Attempting to create the database...
      NOTE: you will get an error here if you are updating...
      Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\xampp\htdocs\xdbcms\INSTALL\database_dump.php on line 14

      Problem: I could not connect to the database. Please check username and password of MySQL root user in XDB_install

      I looked up ODBC in google but could not quite understand what is going on there. Is that some kind of go between concerning windows and the system running the Apache? Like I said I am using a combo package called Xampp which has Apache, php, perl and some other assorted things.

      Sperry

       
      • Nobody/Anonymous

        This is getting more strange...

        Ok, here's a suggestion (I'm assuming that you've got nothing else running within the system, so if it breaks, its not the end of the world - if you _have_ got some other system running, then back up your installation first!)

        Have a look at : http://www.apachefriends.org/en/faq-xampp-windows.html#password0

        This shows you how to change the 'root' user password. Once completed, you _should_ be able to use the user 'root' and the password that you've assigned in the install and main login screens.

        Must admit, I'm not sure where 'odbc' comes from - normal installation shouldn't need it - saying that, odbc drivers may have been installed so that other programs can see the mysql database (e.g. access / excel etc)

        Carl.

         
    • Nobody/Anonymous

      Hello Carl,

      I did all your suggestions and have the user set as root with my password and changed the conig.inc in the phpmyadming folder. It still will not work and brings up the ODBC@localhost error.

      But all these other cms's I am testing will work.

      I found the link on your site to the firepages server set up and downloaded it and I am able to run your program with that server. I will try out your program now and see how things go.

      Also, your link to firepages (http://www.firepages.au/) is a dead link. I searched and found that the actual link should be (http://www.firepages.com.au/) has a .com in it.

      Thanks Again,
      Sperry

       

Log in to post a comment.

MongoDB Logo MongoDB