Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Phpmyadmin, Create new database: No Privileges
666hellradio
post Jun 17 2008, 03:40 PM
Post #1


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 18
Joined: 15-June 08
From: Work
Member No.: 63,656



i can not make a sql for diff srcipt, but the sricpt i have is php, DJ-cpanel.. all tho i can not install it the error is like this
Creating Database Tables
No database selected

there a mysql database is made, but i can not use it for othere stuff... plz note that this is Free script and not for paid..
is there a way that the myqsul can not use sql other scripts?
or it maybe not working... but i am not sure if the script not working or it can be the server may be down on mysql...?
Go to the top of the page
 
+Quote Post
Erdemir
post Jun 17 2008, 04:01 PM
Post #2


Super Member
*********

Group: [HOSTED]
Posts: 221
Joined: 12-May 08
From: Istanbul, Turkey
Member No.: 62,045



If I understood right, you can't create the tables in a database.

1. Firstly you must create a database. To do this, click MySQL Databases in Databases section. Enter your database name in New database: textbox, and click Create Database.
2. After creation of database go back to cpanel index and click PhpMyAdmin in Databases section. After entering PhpMyAdmin on the left coulomb there is the database you created. Click on it. In the new page click SQL and you can write your sql codes, it must run well now.

This post has been edited by Erdemir: Jun 17 2008, 04:08 PM
Go to the top of the page
 
+Quote Post
666hellradio
post Jun 17 2008, 04:10 PM
Post #3


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 18
Joined: 15-June 08
From: Work
Member No.: 63,656



can it work on auto? like make the tables by it self? becuse i don't know how to do that, and then i been using mysql befor. but idon't know how to set up tables.. i having learn that yet..and 2 is there a way to bypass it with out doing it? and install it fine?
or is there a way to like make it work... or do i have to still do the tables?



QUOTE(Erdemir @ Jun 17 2008, 12:01 PM) *
If I understood right, you can't create the tables in a database.

Firstly you must create a database. To do this, click MySQL Databases in Databases section. Enter your database name in New database: textbox, and click Create Database. After creation of database go back to cpanel index and click PhpMyAdmin in Databases section. After entering PhpMyAdmin on the left coulomb there is the database you created. Click on it. In the new page click SQL and you can write your sql codes, it must run well now.

Go to the top of the page
 
+Quote Post
majklisko
post Jun 17 2008, 04:38 PM
Post #4


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 21
Joined: 31-October 07
Member No.: 52,277



how to create table
i mention 2 ways:
1. go to 'Databases' in cpanel, select phpmyadmin go to your database, u will see the 'create table' form - that's it u're looking for

2. create a script and run it
insert this code into this:
CODE
<?php
// Make a MySQL Connection
mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

// Create a MySQL table in the selected database
mysql_query("CREATE TABLE example(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(30),
age INT)")
or die(mysql_error());

echo "Table Created!";

?>


replace the parameters u need
Go to the top of the page
 
+Quote Post
666hellradio
post Jun 17 2008, 05:06 PM
Post #5


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 18
Joined: 15-June 08
From: Work
Member No.: 63,656



where do i add this? there no box to put it in ?




QUOTE(majklisko @ Jun 17 2008, 12:38 PM) *
how to create table
i mention 2 ways:
1. go to 'Databases' in cpanel, select phpmyadmin go to your database, u will see the 'create table' form - that's it u're looking for

2. create a script and run it
insert this code into this:
CODE
<?php
// Make a MySQL Connection
mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

// Create a MySQL table in the selected database
mysql_query("CREATE TABLE example(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(30),
age INT)")
or die(mysql_error());

echo "Table Created!";

?>


replace the parameters u need

Go to the top of the page
 
+Quote Post
majklisko
post Jun 17 2008, 08:28 PM
Post #6


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 21
Joined: 31-October 07
Member No.: 52,277



have u never tried to program something?
if u have no idea how to make a php script, i don't understand, why do u ask anything about sql and databases
ok...it isn't lost yet: just open notepad, copy the code with replaced parameters into the document, save it as a php document (.php) and upload it to your server, then type the url of the document...that's all
Go to the top of the page
 
+Quote Post
666hellradio
post Jun 17 2008, 09:40 PM
Post #7


Newbie [Level 1]
*

Group: [HOSTED]
Posts: 18
Joined: 15-June 08
From: Work
Member No.: 63,656



ok i get this all tho MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php// Make a MySQL Connectionmysql_connect("localhost", "hellrad_djlogin", "he' at line 1

i did like put all the info in it, but it still can't connect to it at all?
i am not sure what i am doing wrong here? but i need like a umm some one walk me tho it and not skip it, i know u are trying to help me but... it don't me any idea why the Mysql can't not work...

QUOTE(majklisko @ Jun 17 2008, 04:28 PM) *
have u never tried to program something?
if u have no idea how to make a php script, i don't understand, why do u ask anything about sql and databases
ok...it isn't lost yet: just open notepad, copy the code with replaced parameters into the document, save it as a php document (.php) and upload it to your server, then type the url of the document...that's all


This post has been edited by 666hellradio: Jun 17 2008, 10:04 PM
Go to the top of the page
 
+Quote Post
iGuest
post Aug 19 2008, 03:49 PM
Post #8


Trap Double Mocha Member
***************

Group: Members
Posts: 2,360
Joined: 21-September 07
Member No.: 50,369



Ok I had the same problem and I realized that even though I had set up a username and password, I had not associated that username with that database. I went into mySQL database and went to Add User To Database and picked my username and database...Voila! I'm in!

-reply by Puskit
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Mysql Database Setup : Setting Up Mysql Database(6)
  2. Table Duplication(5)
  3. Mysql Database Problem(1)
  4. Installing Apache, Mysql, Phpmyadmin Locally(5)
  5. X7chat2_0_0 Sql Database Privledge Error(2)
  6. Mysql Database Problem(6)
  7. Phpbb Forum Installation Problem(4)
  8. Is It Possible To Move Only Part Of A Mysql Database(4)
  9. Recommand A Good Database Module Or Component On Mambo(0)
  10. Trap17 Database Problems?(10)
  11. How To Crate Mysql Database?(7)
  12. Database Is Deleted(6)
  13. I Can Not Create Mysql Databases In Control Panel Using Phpmyadmin(3)
  14. Still Can't Create Databases In Phpmyadmin(8)
  15. Can't Access Phpmyadmin(2)
  1. Database Errors!(5)
  2. Database Connection Problem(5)
  3. Installing Phpbb(0)
  4. Need Help With My Database(19)
  5. Changes In Phpmyadmin(0)
  6. Phpmyadmin Error(4)
  7. Phpmyadmin Error [resolved](7)
  8. I Need Help Transferring Sql Database?(3)