Hi, I'm new here, and since Cutenews wasn't working with my sites dynamic includes [thanks to the tut on here =D], I decided to get rid of it. Well...one thing lead to another and I decided to get rid of Blogger, too. XD
Anyhow, I'm quite familiar with basic PHP [includes, external stylesheets, stuff like that], but EXTREMELY N00B at MySQL [as in, I just created a database on about an hour ago for the purposes of following this tut]. Needless to say, I've run into errors.
Here's what my script looks like:
CODE
<?php
mysql_connect ('localhost', 'sairah_sscribble', '****************');
mysql_select_db ('sairah_ss');
$sql = "CREATE TABLE php_blog (
id int(20) NOT NULL auto_increment,
timestamp int(20) NOT NULL,
title varchar(255) NOT NULL,
entry longtext NOT NULL,
PRIMARY KEY (id)
)";
$result = mysql_query($sql) or print ("Can't create the table 'php_blog' in the database.<br />" . $sql . "<br />" . mysql_error());
if ($result != false) {
echo "Table 'php_blog' was successfully created.";
}
mysql_close();
?>
...and this is what it's returning me:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/hsphere/local/home/sairah/sairah.endless-time.net/ssdb.php on line 2
Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/hsphere/local/home/sairah/sairah.endless-time.net/ssdb.php on line 3
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /var/hsphere/local/home/sairah/sairah.endless-time.net/ssdb.php on line 3
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/hsphere/local/home/sairah/sairah.endless-time.net/ssdb.php on line 12
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /var/hsphere/local/home/sairah/sairah.endless-time.net/ssdb.php on line 12
Can't create the table 'php_blog' in the database.
CREATE TABLE php_blog ( id int(20) NOT NULL auto_increment, timestamp int(20) NOT NULL, title varchar(255) NOT NULL, entry longtext NOT NULL, PRIMARY KEY (id) )
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Warning: mysql_close(): no MySQL-Link resource supplied in /var/hsphere/local/home/sairah/sairah.endless-time.net/ssdb.php on line 18
Any help please?