• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Problem creating Database on Mysql using PHP... :(

timelapse

Senior member
Hello everyone, i have been trying to create a database on a MySql server using a simple PHP script (See below) however when i execute it i get the following error fro mthe Mysql server: "Error creating database: Access denied for user: 'user@serveradd' to database 'dbnameiwant' ?> Could someone look at the coede below and tell me if i am doing something wrong? I am pretty sure my log/pass is ok because if i change them i get an uglier error 😉 (the log/pass was given to me by a school administrator). Here is the code:

<?php

$link = mysql_connect("serveradd", "user", "pass")
or exit("Could not connect");

if (mysql_create_db("dbnameiwant")) {
print ("Database created successfully\n");
} else {
printf ("Error creating database: %s\n", mysql_error ());
}
?>


Thanks for your help.
 
Oopss.... I jsut realized they created a DB with my login as the name, so i can connect now, thx to all, and excuse the ignorance 🙁
 
Back
Top