Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-27-2002, 05:53 AM
|
#1
|
|
Member
Registered: Jun 2002
Posts: 31
Rep:
|
MySQL Cannot Access Database
I am trying to set up a forum on my server, Apache, MySQL, PHP and Perl...
THe problem is that it returns the error
MySQL error that was returned: 1046 -> No Database Selected
I have tried to select the database using the 'USE' command in mysql, and it doesn't work.
Any suggestions would be greatly appreciated.
|
|
|
|
11-27-2002, 05:57 AM
|
#2
|
|
Member
Registered: Jul 2002
Posts: 109
Rep:
|
what steps have you done before?
|
|
|
|
11-27-2002, 07:46 AM
|
#3
|
|
Member
Registered: Jun 2002
Posts: 31
Original Poster
Rep:
|
Alright I restart my computer and do the following once logged in:
(apache/mysql are installed in /web/apps/)
$ /web/apps/apache/bin/apachectl start
Apache starts, no errors.
$/web/apps/mysql/share/mysql/mysql.server start
MySQL daemon starts up, no problems.
Nothing doing.
|
|
|
|
11-27-2002, 09:37 AM
|
#4
|
|
Member
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472
Rep:
|
well, here's how i get mysql started.
root@localhost:~# mysql
that'll start the monitor, and then you'll wanna specifiy which database to use:
mysql> use isp;
then just query a table in the database:
SELECT * FROM table;
that should be about it. if you can't connect you might wanna check and make sure you have a valid root user added to mysql.
|
|
|
|
11-27-2002, 10:06 AM
|
#5
|
|
Member
Registered: Jun 2002
Posts: 31
Original Poster
Rep:
|
SELECT * FROM table;
The problem is that no tables are set up yet...
|
|
|
|
11-27-2002, 10:12 AM
|
#6
|
|
Member
Registered: Jun 2002
Posts: 31
Original Poster
Rep:
|
Also...
When I try to use phpMyAdmin, the following happens:
mysql> /web/apps/mysql/bin/safe_mysqld: line 273: 1358 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASE_DIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking >>$err_log 2>&1
Number of processes runing now: 1
mysqld process hanging, pid 1361 - killed
021127 09:08:22 mysqld restarted
|
|
|
|
11-27-2002, 10:46 AM
|
#7
|
|
Member
Registered: Jul 2002
Posts: 109
Rep:
|
Did you create database?
there is also an install_db_mysql.... something like that to create default database for you to use.
|
|
|
|
11-27-2002, 10:51 AM
|
#8
|
|
Member
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472
Rep:
|
you'll obviously need to create the DB/Table before you can proceed with some of my steps.
you can create a database by typing:
CREATE DATABASE whatever;
use whatever;
CREATE TABLE foobar (
recnum INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
data TEXT,
time DATETIME);
i'd also become at least a little familiar with SQL before using myphpAdmin, since it's always good to have backend knowledge. :-)
|
|
|
|
11-27-2002, 12:36 PM
|
#9
|
|
Member
Registered: Jun 2002
Posts: 31
Original Poster
Rep:
|
Yea, I tried it at the recommendation of someone else, but that didnt work either...
I wil lmake the table and see..
|
|
|
|
11-27-2002, 01:04 PM
|
#10
|
|
Member
Registered: Jun 2002
Posts: 31
Original Poster
Rep:
|
mysql> CREATE TABLE forums (
-> recnum INTERGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
-> date TEXT,
-> time DATETIME);
ERROR 1064: You have an error in your SQL syntax near 'INTERGER NOT NULL
KEY AUTO_INCREMENT,
date TEXT,
time DATETIME)' at line 2
That is the error I get... I think what I did wrong is try to create a table where you descripbed teh vars... I am not sure.
Also, I tried the mysql.conm docu, but all they described was a table of pets... specifically I am trying to create a database for www.invisionboard.com and www.oxyscripts.com oxynews...
|
|
|
|
11-27-2002, 01:35 PM
|
#11
|
|
Member
Registered: Jan 2002
Distribution: slackware
Posts: 193
Rep:
|
You spelled integer wrong
|
|
|
|
11-27-2002, 01:41 PM
|
#12
|
|
Member
Registered: Nov 2002
Location: UK
Distribution: Redhat 8
Posts: 30
Rep:
|
Also if something is a primary key it cannot be null - you dont need to include the additional not null statement - at least thats the way it normally works - may be different for mySQL
|
|
|
|
11-27-2002, 07:02 PM
|
#13
|
|
Member
Registered: Jun 2002
Posts: 31
Original Poster
Rep:
|
Quote:
Originally posted by jstu
You spelled integer wrong
|
I spelled it the same way you did...
blade: thanks.. I will look into it ASAP (one of my 2 moniters died, and now I dont have aserver moniter).
|
|
|
|
11-27-2002, 08:30 PM
|
#14
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
it's INTEGER not INTERGER
LOL
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:45 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|