View previous topic :: View next topic |
Author |
Message |
ivanmiller -
Joined: 25 May 2004 Posts: 16
|
Posted: Tue Jun 29, 2004 11:14 pm Post subject: how do i create a my sql database |
|
|
hi i have my sql, i have the freen light thing at the side of my clock, i wanna know my sql username, password, and database name or create one, how do i do that? when i right click on databases i receibe this options: flush hosts, flush logs, flush tables, flush threads, any other option, so how do i know my sql username, pass, and database name? can someone please help me, my script ask em.. |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jun 29, 2004 11:19 pm Post subject: |
|
|
You need to install phpMyAdmin if you want to
create a database , http://os17fan.cjb.net/ |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 29, 2004 11:20 pm Post subject: |
|
|
First, your username and password are those you entered when you installed MySQL. If you never entered anything, then your username is "root" with no password.
Install phpMyAdmin (along with PHP if you already haven't) using the tutorials in the "Tutorials" section of this forum. The PHP tutorial is available at http://www.aprelium.com/abyssws/php.html . _________________ Bienvenidos! |
|
Back to top |
 |
 |
ivanmiller -
Joined: 25 May 2004 Posts: 16
|
Posted: Tue Jun 29, 2004 11:24 pm Post subject: |
|
|
I already have php my admin, but then if my user is root, no password, and which is the database name? |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 29, 2004 11:41 pm Post subject: |
|
|
There are two default databases: mysql, and test. Once in phpMyAdmin, you can just fill out the text box on the first page to make a new database. _________________ Bienvenidos! |
|
Back to top |
 |
 |
00squeaky -
Joined: 11 May 2004 Posts: 60
|
Posted: Fri Jul 02, 2004 9:20 am Post subject: |
|
|
or you could do it the hard way bby finding the program called mysql in the bin folder of mysql. or use these usefull php scripts.
Code: |
//set up a mysql connection
$link = mysql_connect('your ip', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
//connect to a database
$db_selected = mysql_select_db('your database', $link);
if (!$db_selected) {
die ('Cannot use requested database<BR> ' . mysql_error());
}
//create a database
if (mysql_create_db('a database')) {
echo "Database created successfully\n";
} else {
echo 'Error creating database: ' . mysql_error() . "\n";
}
//query a databbase
$sql="create database yourdb";
mysql_query($sql);
|
for creating databases, that is all you really need to know. _________________ Languages mastered:
HTML,GML,C,PHP,MYSQL (not really a language, but wtf) |
|
Back to top |
|
 |
|