Bare with me to see if I am doing this correct. Thanks
I need to create a database this i know. (newone being the db)
create database newone;
I have a newone.sql file with a the table I need.
mysql newone -uxxx -pxxx < /root/newone.sql
So far i have checked this and its all there correct.
Question one:
Setting a user name and password up for this database. I am haveing troubles doing this.
Question two:
If i get question one done it may change this problem.
In the php script I have i need to acces this db. since I am not sure about username and password I get a error.
"Fatal error: Call to undefined function: mysql_pconnect() in /var/
Is this error cause by the username and password not being set or is there a error connecting to the DB.
In this php file i get a error too.
<h3> Press RELOAD to add a record to the MySQL database:</h3>
<?
//establish user connection
mysql_connect("localhost"
//open up database
mysql_create_db("testdatabase"
mysql_select_db("testdatabase"
//create table
mysql_query("CREATE TABLE newone(firstName VARCHAR(25),lastName VARCHAR(25))"
mysql_query ("INSERT INTO newone (firstName, lastName) VALUES ('Amir', 'Khan')"
//display the information
$result = mysql_query ("SELECT * FROM newone"
while($row = mysql_fetch_array($result))
{
print ("Added record: " . $row["firstName"]." ".$row["lastName"]." <br>\n"
}
//close user connection
mysql_close();
?>
error is \n" } //close user connection mysql_close(); ?>
Not sure why this error. Please help me thanks
Cxteam
I need to create a database this i know. (newone being the db)
create database newone;
I have a newone.sql file with a the table I need.
mysql newone -uxxx -pxxx < /root/newone.sql
So far i have checked this and its all there correct.
Question one:
Setting a user name and password up for this database. I am haveing troubles doing this.
Question two:
If i get question one done it may change this problem.
In the php script I have i need to acces this db. since I am not sure about username and password I get a error.
"Fatal error: Call to undefined function: mysql_pconnect() in /var/
Is this error cause by the username and password not being set or is there a error connecting to the DB.
In this php file i get a error too.
<h3> Press RELOAD to add a record to the MySQL database:</h3>
<?
//establish user connection
mysql_connect("localhost"
//open up database
mysql_create_db("testdatabase"
mysql_select_db("testdatabase"
//create table
mysql_query("CREATE TABLE newone(firstName VARCHAR(25),lastName VARCHAR(25))"
mysql_query ("INSERT INTO newone (firstName, lastName) VALUES ('Amir', 'Khan')"
//display the information
$result = mysql_query ("SELECT * FROM newone"
while($row = mysql_fetch_array($result))
{
print ("Added record: " . $row["firstName"]." ".$row["lastName"]." <br>\n"
}
//close user connection
mysql_close();
?>
error is \n" } //close user connection mysql_close(); ?>
Not sure why this error. Please help me thanks
Cxteam