Jump to content

Getting MySQL working using WAMP


duncan2010

Recommended Posts

Hi all, new to this coding business and spent days trying to get apache, php 5 and MySQL working on my windows pc. Finally got there and can only connect to database using mysqli instructions. Problem is that the book I am trying to learn from only has mysql code. I have been into the php.ini and un-commented the mysql extension, which was commented.

 

I am running the following command:

 

$conn = mysql_connect('localhost', 'username', 'pwd');

 

and it says Client does not support authentication protocol, consider upgrading mysql client.

 

Help!! I downloaded the latest cersion of mysql. Can somebody explain whether I should be learning mysqli or not and what I need to do to be able to run mysql.

 

Any help appreciated.

 

Link to comment
Share on other sites

What does a phpinfo(); statement show for the php version and the mysql client library version information?

 

The mysql client is the client library that php is using to connect with the mysql server. The error you are getting is usually caused when you are using an older version of php (and the client library files that come with it) with a newer version of mysql.

 

@J-C, his issue is not enabling the extension, it is getting an error when using that extension to connect to the mysql server.

Link to comment
Share on other sites

Hi, when I say WAMP I just mean Windows, APache, MySQL and PHP. It's nothing that I have specially downloaded.

 

I am using PHP Version 5.0.0 and MySQL Server 5 I hope that helps.

 

The Mysql Client API is 3.23.57 and Mysqli is 4.1.3-beta.

 

It's annoying, because most of the books say to download the latest version of all the php and mysql, but then when you do (or atleast I thought I did) they aren't compatible or they don't run the code that the book lists.

 

I think I would be happier if I was sure which coding to persue, mysql or mysqli, so that I don't learn one and find that I can only run the other. Sorry if that sounds really simplistic for what I'm sure is a large topic, but bein a newbie I don't understand all too much yet, just want to get some code running.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.