IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
2 Pages V   1 2 >  
Closed TopicStart new topic

SQL database


chinfo
no avatar
Advanced Member
*******
Group: Members
Posts: 119
Joined: 19-July 04
Member No.: 140



Post #1 post Jul 29 2004, 11:59 AM
How long does it take a database you created to be recognized? I want to install phpnuke, but I can't make it connect to the database I created using the name for that particular db. I'd realy appreciate it if you could help me sort this out.
Go to the top of the page
+Quote Post
znithy
no avatar
Newbie [Level 2]
**
Group: Members
Posts: 33
Joined: 25-July 04
Member No.: 203



Post #2 post Jul 30 2004, 04:14 PM
I know a little about it.

WYSWYC
first,using MySQL Databases to create databases,the name will be Yourname_name.
then ,using phpMyAdmin--SQL to create tables.

eg:
1.adding database znithy_base1
2.giving znithy_base1 Privileges to znithy
3.go to phpMyAdmin--SQL
4.run codes:
CREATE TABLE club_posts (
id mediumint(8) unsigned NOT NULL auto_increment,
fid mediumint(8) unsigned default '0',
nickname varchar(20) NOT NULL default '',
email varchar(50) default NULL,
) TYPE=MyISAM;

IN phpMyAdmin--SQL console
Go to the top of the page
+Quote Post
Spectre
no avatar
Privileged Member
*********
Group: Members
Posts: 873
Joined: 30-July 04
Member No.: 246



Post #3 post Jul 30 2004, 05:00 PM
Uh, a database is present and 'recognised' the instant that it is created.

As znithy said, you need to make sure you include the 'yourname_' before the database name you are trying to connect to. Also, 'yourname_' before the user name you are using to connect to the database server.

From PHP, you can create a MySQL database simply with the mysql_create_db() function. Or, if you wanted to, you could run it as a query, eg:
CODE
mysql_query("CREATE DATABASE db_name");
Go to the top of the page
+Quote Post
OpaQue
no avatar
Administrator
**************
Group: Admin
Posts: 1,625
Joined: 11-June 04
From: Somewhere in Time & Space.
Member No.: 1
myCENT:NEGATIVE[-78.06]



Post #4 post Jul 30 2004, 06:18 PM
Yes! Databases are recognised instantly. However, Whatever databases you create are prefixed with your username, I guess. So may be If you created a database called DAT then try accessing it with the name yourusername_DAT ... You can easily see it..
The other easy way would be use phpmydamin and try connecting with it. Atleast you will be assured that your database is fine. then you may also use the SQL generated by it in your programs.
Go to the top of the page
+Quote Post
KooL
no avatar
Member [Level 1]
****
Group: Members
Posts: 61
Joined: 27-July 04
Member No.: 216



Post #5 post Jul 31 2004, 01:12 AM
how come u cant use the autoinstaller? it makes the database for u, so u dont have to worry about it.
Go to the top of the page
+Quote Post
chinfo
no avatar
Advanced Member
*******
Group: Members
Posts: 119
Joined: 19-July 04
Member No.: 140



Post #6 post Jul 31 2004, 02:04 AM
The problem is , I know the database is there, and the name I used is totally correct, but my nuke installation can't find it, says it doesn't exist and I tried several times.

EDIT:

I've finally sorted it out! Eureka laugh.gif
Go to the top of the page
+Quote Post
Spectre
no avatar
Privileged Member
*********
Group: Members
Posts: 873
Joined: 30-July 04
Member No.: 246



Post #7 post Jul 31 2004, 05:10 AM
Mind sharing what the problem was, for future reference?
Go to the top of the page
+Quote Post
chinfo
no avatar
Advanced Member
*******
Group: Members
Posts: 119
Joined: 19-July 04
Member No.: 140



Post #8 post Jul 31 2004, 05:34 AM
Ok, you see when you create a database through cPanel in Trap17 you only enter the database name. You have to create a username separately and assign that username to the database you created. I was used to having to create a database and username all in just one step that I overlooked this. rolleyes.gif

So even if you entered all the correct info in phpNuke's config.php file, if the dbuname value (example xxx_yyy) hasn't been granted permission for that particular database through cPanel, it will tell you the database doesn't exist.
Go to the top of the page
+Quote Post
Spectre
no avatar
Privileged Member
*********
Group: Members
Posts: 873
Joined: 30-July 04
Member No.: 246



Post #9 post Jul 31 2004, 03:23 PM
I'm not sure about the set up here, but generally, an account comes with a default MySQL username, usually just 'yourname'. So you shouldn't have to create a new user account for MySQL and assign its permissions if you don't want too.
Go to the top of the page
+Quote Post
stevey
no avatar
Advanced Member
*******
Group: Members
Posts: 119
Joined: 12-July 04
From: london
Member No.: 85



Post #10 post Jul 31 2004, 03:53 PM
hey with database problems there's always just one simple solution. and that is that you actuall gotta have a good database management programme and the best one so far is phpmyadmin. if you use that i dont think you'll have anyproblems and if you do i think it will let you know.
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Closed TopicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   2 threepach 2,164 19th February 2008 - 08:30 PM
Last post by: threepach
No New Posts   7 Raptrex 13,227 27th August 2004 - 11:16 PM
Last post by: Spectre
No New Posts   2 Raptrex 3,392 1st October 2004 - 05:53 AM
Last post by: serverph
No New Posts   4 brandrocker 611 27th December 2008 - 12:16 PM
Last post by: OpaQue
No New Posts 4 NuHoaXuLa 2,917 8th February 2009 - 10:58 AM
Last post by: Quatrux
No New Posts   0 lawmatchmaker 729 23rd June 2006 - 07:46 AM
Last post by: lawmatchmaker
No New Posts   4 logophobia 2,993 8th February 2009 - 11:01 AM
Last post by: Quatrux
No New Posts 5 khmerneed 5,253 17th July 2009 - 09:22 AM
Last post by: iG-Ranjan
No New Posts   4 cse-icons 3,620 7th February 2005 - 02:37 PM
Last post by: OpaQue
No New Posts   0 OpaQue 5,575 28th January 2005 - 08:48 AM
Last post by: OpaQue
No New Posts   4 Hamtaro 3,074 2nd February 2005 - 02:28 AM
Last post by: Hamtaro
No New Posts   8 spiderink 2,475 3rd February 2005 - 03:11 PM
Last post by: dropout21
No New Posts 4 Keeper 2,445 5th February 2005 - 02:55 AM
Last post by: maddog39
No New Posts 7 OpaQue 10,377 17th February 2009 - 09:17 PM
Last post by: Xalor
No New Posts   3 vivek mahajan 562 1st June 2008 - 08:14 PM
Last post by: vivek mahajan


 



RSS Open Discussion Time is now: 22nd November 2009 - 02:56 AM

Web Hosting Powered by ComputingHost.com.