Kristof Posted January 31, 2004 Report Share Posted January 31, 2004 (edited) I have installed MySQL and I have created a user and a database. I have granted this new user all priviliges to the new database. Here is how I try to login: mysql -u kristof -p **password** ERROR 1045: Access denied for user: 'kristof@localhost' (Using password: YES) If I don't use the -p parameter, I don't get the error and I can login. I am positive that I typed the correct password. What could be wrong? I decided to test MySQL with a small PHP file. <?php $user="kristof"; $password="***"; $cnn = mysql_connect("localhost", $user, $password) or die ("Not connected"); ?> When I view that php file in my browser, I get this error: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test.php on line 5 Do I have to modify my apache config? Edited January 31, 2004 by Kristof Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 1, 2004 Report Share Posted February 1, 2004 for a start you may need to install the php-mysql module urpmi php-mysql if you are using apache you will need mod_php as well. You have a database and user set up? via webmin? Quote Link to comment Share on other sites More sharing options...
jleaman Posted February 1, 2004 Report Share Posted February 1, 2004 what version of mandrake are you running.. why not just use the webadmin page and set it up that way in the mysql database and users list..? Quote Link to comment Share on other sites More sharing options...
Kristof Posted February 1, 2004 Author Report Share Posted February 1, 2004 I'm a linux newbie; I did my first install a few weeks ago. I am using Mandrake 9.2. I had no idea there was something like webmin or webadmin. I just used the CLI, like I did in Windows, using the command prompt. So I need to do urpmi php-mysql. And for the mod_php? Is that also something I need to install, or something I need to modify in a config file? And what exactly is webmin? Quote Link to comment Share on other sites More sharing options...
Michel Posted February 1, 2004 Report Share Posted February 1, 2004 http://www.webmin.com/ I don't use it ..but I want to test it ... It lets you control servers, your linux system, ..throught a webinterface .... Quote Link to comment Share on other sites More sharing options...
Kristof Posted February 1, 2004 Author Report Share Posted February 1, 2004 I installed php-mysql en mod_php and everything is working fine now. I have deleted the user and have created it again and it works now. Thanks for the help! I also gave webmin a try. Looks very nice! Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 1, 2004 Report Share Posted February 1, 2004 php-mysql is the php module that contains the mysql functions mysql_query() etc. mod_php is an apache module that allows your webserver to process .php scripts and serve them. If you are only using php for command line scripts then mod_php is not needed. Quote Link to comment Share on other sites More sharing options...
kde-head Posted February 1, 2004 Report Share Posted February 1, 2004 grab a copy of phpMyAdmin as well. urpmi phpmyadmin should work. that gives you a nice web interface to your mysql install. the MySQL Control Center is useful too -but use with caution. Any data changes are immediately implemented in your MySQL database. You dont get a submit button with MySQL CC - you are actually editing the live data. Quote Link to comment Share on other sites More sharing options...
jleaman Posted February 2, 2004 Report Share Posted February 2, 2004 May i ask a question..? What does urpmi ***phpmyadmin*** *being the program * what exactly does urpmi actually do and mean.. ? Quote Link to comment Share on other sites More sharing options...
johnnyv Posted February 2, 2004 Report Share Posted February 2, 2004 urpmi is the command name of the mandrake rpm installer urpmi for install/upgrade urpme for uninstall entered via the commandline. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.