Problem with MySQL

Joined
12 Feb 2006
Posts
17,418
Location
Surrey
im trying to i bleieve insert a user into mySQL, well not sure what it is actually called, i have been told to do this from a video i am using to teach me this:

use mysql;
show tables;
select * from user \G;

this then brings up a load of information and i need to make my own. i watch the woman type in this and hers works fine, however mine doesnt seem to:

INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ("localhost", "php", Password("i put my Password in here"), "Y", "Y", "Y", "Y");

then when i click enter i get a beep from my computer and this messege which is where i get stuck as i have no clue what i need to put for it:

ERROR 1364 (HY000); Field 'ssl_cipher' doesn't have a default value

What do i do to sort this out?
 
there is a column in user called ssl_cipher which is mandatory and you are not putting a value into it. Perhaps the video if for a different version of my sql that the one you are using? The usual way to create a user is with a CREATE USER statement rather than trying to insert directly into the user table.

HT
 
o so how do i do the creat user statement using the same info, do i just replace the INSERT INTO with CREATE?

also so what information would i need for ssl_cipher?

Yeah the version they are demonstrating is unfortunutely almost 4 years old :( as thats all i can find but so far it has been ok. Any other training videos you know of that are free and for either HTML, PHP, or MySQL?

Also is the command thingy case sensitive when typing in the what im inserting e.g. when typing in this does it matter that the name host, user, password all have a capital letter to begin with?

INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ("localhost", "php", Password("i put my Password in here"), "Y", "Y", "Y", "Y");
 
ok now having a new problem with php and mysql,

i type in this:

<?php
require ($_server ["DOCUMENT_ROOT"]. "C:/Documents and Settings/Adam-Paul/My Documents/Website/Webroot/config/db_config.php");
$connection = mysql_connect ($db_host, $db_user, $db_password) or die ("error getting connection");
echo "connection successful";

?>

and get this messege when viewing it on a browser:

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\documents and settings\adam-paul\my documents\website\webroot\temp_con.php on line 3
error getting connection

Does anyone know what could be wrong with this? i am usuing a video tutorial and this is excatly what the lady has put in, however hers work and mine doesnt :(. I have tried it with something else but i still get the same messege about the mysql_connect() part, am i doing something wrong?
 
Back
Top Bottom