LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-25-2005, 03:58 AM   #1
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Rep: Reputation: 15
cannot install SQL


OK

So I am still pretty new so bare with me. I have an hp pavalion that I set up with Kubuntu. I have a Sam teach yourself book that will guide through My SQL,PHP and Apache set up. So far this is the error I am getting. I have created a directory with the source code. I change to the directory and and run the command below but get this error. Can anyone tell me what this means. Do I need to download a compliler? Please help

Thanks,

root@ubuntu:/usr/local/src/mysql-4.0.21 # ./configure --prefix=/usr/local/mysql
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking target system type... i686-pc-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) mawk
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
root@ubuntu:/usr/local/src/mysql-4.0.21 #
 
Old 09-25-2005, 05:45 AM   #2
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Yes, it seems you have no C compiler installed.

Is there some reason you want to compile MySQL from source instead of installing the deb package of mysql-server? If the following doesn't work, open /etc/apt/sources.list and remove the leading # symbol from some sources, and try again
Code:
apt-get install mysql-server

Last edited by Snowbat; 09-25-2005 at 02:01 PM.
 
Old 09-25-2005, 11:04 AM   #3
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Snowbat,

OK this is what I got just running the apt- get install mysql - server. I did now try removing the # symbol first. How do I do that and what did it effect being that it seems that MySQL was installed properly. Can you verufy that for me.



root@ubuntu:/home/ben # apt-get install mysql-server
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl mysql-client
Suggested packages:
dbishell libcompress-zlib-perl mysql-doc
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl mysql-client
mysql-server
0 upgraded, 6 newly installed, 0 to remove and 71 not upgraded.
Need to get 4757kB of archives.
After unpacking 11.9MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com hoary/main libnet-daemon-perl 0.38-1 [46.0kB]
Get:2 http://us.archive.ubuntu.com hoary/main libplrpc-perl 0.2017-1 [35.0kB]
Get:3 http://us.archive.ubuntu.com hoary/main libdbi-perl 1.46-4ubuntu1 [604kB]
Get:4 http://us.archive.ubuntu.com hoary/main libdbd-mysql-perl 2.9003-3 [130kB]
Get:5 http://us.archive.ubuntu.com hoary/main mysql-client 4.0.23-3ubuntu2 [404kB]
Get:6 http://us.archive.ubuntu.com hoary/main mysql-server 4.0.23-3ubuntu2 [3537kB]
Fetched 4757kB in 2m53s (27.5kB/s)

Preconfiguring packages ...
Selecting previously deselected package libnet-daemon-perl.
(Reading database ... 58686 files and directories currently installed.)
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.38-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2017-1_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.46-4ubuntu1_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_2.9003-3_i386.deb) ...
Selecting previously deselected package mysql-client.
Unpacking mysql-client (from .../mysql-client_4.0.23-3ubuntu2_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_4.0.23-3ubuntu2_i386.deb) ...
Setting up libnet-daemon-perl (0.38-1) ...

Setting up libplrpc-perl (0.2017-1) ...

Setting up libdbi-perl (1.46-4ubuntu1) ...
Setting up libdbd-mysql-perl (2.9003-3) ...
Setting up mysql-client (4.0.23-3ubuntu2) ...
Setting up mysql-server (4.0.23-3ubuntu2) ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for crashed MySQL tables in the background.

root@ubuntu:/home/ben #


The next step in my book takes me through security start up guide lines. Does this look corrrect




root@ubuntu:/home/ben # ps auxw | grep mysqld
root 10591 0.0 0.5 3812 1332 ? S 15:20 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 10639 0.0 2.1 63664 5548 ? Sl 15:20 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root 10640 0.0 0.2 2848 540 ? S 15:20 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
mysql 10695 0.0 2.0 63364 5264 ? Sl 15:51 0:00 mysqld --user=mysqld
mysql 10712 0.0 2.0 63364 5264 ? Sl 15:55 0:00 mysqld --user=non_root_user_ben
root 10730 0.0 0.2 3036 732 pts/3 S+ 15:59 0:00 grep mysqld
root@ubuntu:/home/ben #


Thanks
 
Old 09-25-2005, 01:58 PM   #4
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Well I read on http://os.newsforge.com/article.pl?sid=05/04/19/200205 that some sources are commented out in /etc/apt/sources.list so I reasoned that if apt-get couldn't find mysql-server then uncommenting one or more of those sources would give it more places to search. Uncommenting is done by removing a leading # and space if present from a line, then saving the file.

It looks like apt-get successfully installed mysql-server. I'm getting a similar response from ps auxw | grep mysqld so that looks OK too. At this stage you should follow the post install instructions at http://www.yolinux.com/TUTORIALS/Lin...rialMySQL.html (set mysql root password and create a small database as a test). Then you can move on to configuring PHP and Apache.
 
Old 09-25-2005, 05:16 PM   #5
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Snowbat,

Can you tell me what this promp means. this what I get when I switch the mysql user from root.

root@ubuntu:~ # su mysql
sh-3.00$

The link you gave me looks like this.


Admin user id: root
Default password: blank
The first task is to assign a password:
[prompt]$ mysqladmin -u root password 'new-password'

Note: the following SQL commands will also work:
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;

Im not sure what stat my SQL server is in can you help. you are doing an outstanding job so far and thanks so much for you help

Ben
 
Old 09-25-2005, 06:09 PM   #6
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Snowbat,

The next lesson is installing Apache from source code. could yo ugive some insight on what I will need to do the book is a little confusing. They want me to go to http://httpd.apache.org/ and download the source. Would you recomend using the binaries instead of the source. This is what I downloaded.

http://www.apache.org/dist/httpd/htt....54.tar.gz.md5

can you tell me if this will work or what the best way is to download and install apache
 
Old 09-25-2005, 11:06 PM   #7
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Quote:
Originally posted by killercrazyeyes
Can you tell me what this promp means. this what I get when I switch the mysql user from root.

root@ubuntu:~ # su mysql
sh-3.00$
You don't need to switch to switch to the user 'mysql' yourself - MySQL does this internally when it needs to. As you can see, the user 'mysql' doesn't even have a normal bash prompt.

Just run the following command. This sets the MySQL administrator password. The administrator is called root but don't confuse this MySQL root user with your Linux root user - they are not the same, although you are free to use the same password. Feel free to replace mypassword with something else.
Code:
mysqladmin -u root password 'mypassword'
Now create a test database called bedrock with the following command.
Code:
mysqladmin -h localhost -u root -pmypassword create bedrock
Next we log in to the MySQL administration program and issue some commands to enter information in bedrock. When you're using this program, you'll have a mysql> prompt.
Code:
mysql -h localhost -u root -pmypassword
use bedrock;
create table employee (Name char(20),Dept char(20),jobTitle char(20));
DESCRIBE employee;
You should see the database table you just created. You can try entering some data as shown in 3 and 5 on that page. Type quit to exit the program.

SQL will seem strange at first if you've never used it before but it is not difficult. It's a good idea to become familiar with the administration commands. W3Schools have a nice tutorial: http://www.w3schools.com/sql/sql_intro.asp

Last edited by Snowbat; 09-25-2005 at 11:18 PM.
 
Old 09-25-2005, 11:17 PM   #8
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Yes, I always recommend installing a packaged program when it is available for your distro. An expert user of your distro has already gone to the trouble of compiling it and packaging it in a way that will work well on your distro, and the packaging system will take care of installing any needed dependancies (libraries or other programs that this program needs).

Does your book say to use Apache or Apache2? You can do either
apt-get install apache
or
apt-get install apache2

Does your book say to use php4 or php5? You can do either
apt-get install php4
or
apt-get install php5
 
Old 09-26-2005, 11:14 PM   #9
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Snowbat,

I followed the the commands you outlined but I still so not see a MySQL promp. Is there something I am missing. I get that I don't need to change to that user that makes sense. Can you tell me what happend here.

Thanks,




root@ubuntu:/ # mysqladmin -h localhost -u root -pbodyshocknow create bedrock
root@ubuntu:/ # mysqladmin -h localhost -u root -pbodyshocknow
mysqladmin Ver 8.40 Distrib 4.0.23, for pc-linux-gnu on i386
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
-c, --count=# Number of iterations to make. This works with -i
(--sleep) only
-#, --debug[=name] Output debug log. Often this is 'd:t,filename'
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs.
-C, --compress Use compression in server/client protocol
--character-sets-dir=name
Directory where character sets are.
-?, --help Display this help and exit.
-h, --host=name Connect to host
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty. WARNING: Providing a
password on command line is insecure as it is visible
through /proc to anyone for a short time.
-P, --port=# Port number to use for connection.
-r, --relative Show difference between current and previous values when
used with -i. Currently works only with extended-status.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
-s, --silent Silently exit if one can't connect to server
-S, --socket=name Socket file to use for connection.
-i, --sleep=# Execute commands again and again with a sleep between.
-u, --user=name User for login if not current user.
-v, --verbose Write more information.
-V, --version Output version information and exit
-E, --vertical Print output vertically. Is similar to --relative, but
prints output vertically.
-w, --wait[=#] Wait and retry if connection is down
--connect_timeout=#
--shutdown_timeout=#

Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
count 0
force FALSE
compress FALSE
character-sets-dir (No default value)
host localhost
port 3306
relative FALSE
socket /var/run/mysqld/mysqld.sock
sleep 0
user root
verbose FALSE
vertical FALSE
connect_timeout 43200
shutdown_timeout 3600

Default options are read from the following files in the given order:
/etc/mysql/my.cnf /var/lib/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read

Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server
root@ubuntu:/ #
 
Old 09-26-2005, 11:19 PM   #10
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
My book says use Apache and it says use PHP 5 if possible. I guess i could use 4 if it is more stable and easy to wokwith at this point.
 
Old 09-27-2005, 05:33 AM   #11
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Quote:
Originally posted by killercrazyeyes
I followed the the commands you outlined but I still so not see a MySQL promp. Is there something I am missing. I get that I don't need to change to that user that makes sense. Can you tell me what happend here.

root@ubuntu:/ # mysqladmin -h localhost -u root -pbodyshocknow create bedrock
root@ubuntu:/ # mysqladmin -h localhost -u root -pbodyshocknow
Wrong command
The second line needs to be mysql -h localhost -u root -pbodyshocknow
 
Old 09-28-2005, 09:45 PM   #12
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Snowbat,

Thanks for the heads up. I have been up late with some of this stuff. Thanks for sticking with me. I am able to get MySQL up and at that prompt so we have made progress. Let me see if I can bring up the bedrock database and edit some tables. I will also read the link you sent me I think that will help out a lot on some of the fundamentals.

Cheers
 
Old 09-29-2005, 03:56 AM   #13
sikofitt
LQ Newbie
 
Registered: Sep 2005
Location: brentwood, ca
Distribution: kubuntu desktop, ubuntu server, debian desktop
Posts: 21

Rep: Reputation: 15
Quote:
Originally posted by killercrazyeyes
My book says use Apache and it says use PHP 5 if possible. I guess i could use 4 if it is more stable and easy to wokwith at this point.
haha, i use mysql 3.x.x and php 4 and apache 1.x.x i'm terrified of new releases. but everything works fine.
 
Old 10-04-2005, 11:10 PM   #14
killercrazyeyes
Member
 
Registered: Apr 2005
Location: El Cerrito CA, Bay Area
Distribution: Fedora Core 3, Mandrake 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
Snowbat,

So I can get into SQL but cannot see the database tabel berock. Can you tell me what I am doing wrong. I am reading the link the put about MySQL

Thanks,

Ben
ben@ubuntu:~$ mysql -h localhost -u root -pbodyshocknow
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 4.0.23_Debian-3ubuntu2-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> mysqladmin -h localhost -u root -pbodyshocknow create bedrock
-> use bedrock
-> use bedrock;
ERROR 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 'mysqladmin -h localhost -u root -pbodyshocknow create bedrock
u
mysql> show bedrock
-> SELECT LastName FROM Persons
-> CREATE TABLE persons
-> alter table persons
-> SELECT column_name(s)
-> clear
-> mysqladmin -h localhost -u root -pbodyshocknow create bedrock
->
 
Old 10-05-2005, 10:28 AM   #15
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Quote:
mysql> mysqladmin -h localhost -u root -pbodyshocknow create bedrock
You are trying to issue a 'mysqladmin' command from inside the MySQL monitor program - this won't work The monitor doesn't see the error until you close with ;

Either run the 'mysqladmin' commands before starting the MySQL monitor, or use the equivalent MySQL monitor commands (which may take a different form and syntax to 'mysqladmin' commands).

Last edited by Snowbat; 10-05-2005 at 10:30 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
my sql install hirts123 Linux - Software 14 09-06-2005 11:19 AM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 05:07 PM
minimum package install for sql box kodiakmook Linux - General 1 06-26-2003 05:25 PM
Better SQL ???? m1ke Linux - General 7 12-14-2001 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration