Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    47
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Apache WebServer and MySQL - Not working. :'(

    I have no idea why, but when I enter MySQL on Terminal on my Mac and type in

    "CREATE DATABASE database name;"

    It throws an error saying:

    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'database name'

    What do I do? I've got a feeling that the answer lies within that ominous httpd.conf file...

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,840
    Thanks
    2
    Thanked 160 Times in 155 Posts
    httpd.conf doesn't have anything to do with this problem.

    The user account that you used to log into Mysql with doesn't have privileges to create databases. Did you log in as root, or some other user?

    Login to mysql as root and check the privileges which are set in the user table of the mysql database.

    [root@fc4dev ~]# mysql -u root mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 19 to server version: 4.1.14

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select * from user;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •