Announcement

Collapse
No announcement yet.

Help with mysql/apache2

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help with mysql/apache2

    How can I activate mysql when running apache2? When I access a php file in localhost an error says
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/docs/poll/install2.php on line 18
    Unable to select database

    These databases and things are very confusing to me. It is installed but I just need it set up. I type mysqladmin and I get thousands of commands and I have no idea how to set it up. Please help me. I am just trying to get an online poll on the server.

    #2
    Re: Help with mysql/apache2

    OK, you have PHP, MySQL and Apache running fine. You just need to create a user in MySQL that you give access to the database. You might want to create a user "www-data", or (if you're using your own PHP scripts) make a username accordingly.

    Easiest way to do this (probably) is to install PHPMyAdmin, which is a web-browser based MySQL administration thingy. (Bear in mind: the default MySQL install has one user, root, with no password set.)

    Hope this helps

    Comment


      #3
      Re: Help with mysql/apache2

      It helped but now I am confused now even more. I did the scripts/setup.php to create a database but I have no Idea what to fill in and when I do it gives me the same message in phpmyadmin/

      Comment

      Working...
      X