Results 1 to 10 of 12
Hi there,
I'm trying to get mysql working. I know nothing about it except that it is a database thing. I've read this forum and am totally confused. I've started ...
- 02-10-2007 #1Just Joined!
- Join Date
- Feb 2006
- Posts
- 17
Mysql
Hi there,
I'm trying to get mysql working. I know nothing about it except that it is a database thing. I've read this forum and am totally confused. I've started to learn WinSQL but I want to learn it on Linux.
Do I need a server to run Mysql? What sort of server?
I tried these commands
mysqladmin -u root password mysqldata
This is the result ( mysqladmin:connect to server at 'localhost' failed. Error: 'Can't connect to local MySQl server through socket '/var/run/mysql/mysql.sock (2).
Chech that mysqld is running and the socket /var/rum/mysql/mysql.sock exists
I also did this command before the above:
su root, mysql -c mysql_install _db
also:
etc/rc.d/mysql start
actually in the rc.d folder it is rc.mysqld
I put the extra d in the above commands too and still there is problems.
I would really appreciate it if someone could explain to me if I need a server and if I do which one.
thanks
Michelle
- 02-12-2007 #2Just Joined!
- Join Date
- Jan 2007
- Posts
- 6
What are you trying to use MySQL for?
I am by no means an expert, but typically MySQL is used to store content for web pages. If this is the case, you will need a web server with PHP enabled. Apache is a good web server. Depending on what packages you installed when you installed Slackware, you may already have Apache. You can use pkgtool to see which packages you have installed. If the Apache package is already installed, chances are PHP is installed too.
If you want to use MySQL for storing web content, I would recommend searching these forums for threads on installing and configuring Apache with PHP. There are a lot of threads that can explain the process better than I can.
Once you get Apache and PHP working, you can use PHPmyAdmin to administer your MySQL databases.
I'm pretty new at this myself, but I just setup a web server with Apache, PHP and MySQL so I can provide some help.
- 02-19-2007 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 1
Michelle,
MySQL is a SQL server that comes with Slackware. It appears that it is not running on your box, hence the message: Can't connect to local MySQl server
and the hint: Check that mysqld is running
You can start it manually (you were close) but an easy way to get it going is to make the startup script executable:
chmod a+x /etc/rc.d/rc.mysqld
then reboot. This way it will be running each time you boot. You should see a message near the end of the boot sequence that mysqld is running.
The d on the end of mysqld means it is a daemon (basically a program that runs in the background, waiting for something to happen, like for a client to connect, and then does something.)
Now you should be able to connect to your MySQL server using the mysqladmin and mysql programs. Depending on the security settings, etc, you may be able to use them to connect to other MySQL servers on other machines.
Hope this helps. I have found MySQL to be very stable and robust. I use it to store member information and web content. Homework: look up daemon on wikipedia.org, also look into postgreSQL www.postgresql.org if you don't like MySQL.
Good luck.,
Paul
- 02-19-2007 #4Just Joined!
- Join Date
- Feb 2007
- Posts
- 41
Michelle,
Whats the output of
This will tell us if its running or not. After that is decided we can work on the connection issue. There are two ways to connect, through the socket like its trying over tcp.Code:ps -ef | grep mysql
Brock
- 02-21-2007 #5
well, none of you gave the correct solution
su - mysql
mysql_install_db
su
password
and after that
/etc/rc.d/rc.mysqld start
another way ( if that doesn't work for you is changing the ownerships)
here's what i did with a server after installing the tables, and the mysql daemon wouldn't start
chown mysql.mysql /var/lib/mysql
chmod 770 -R /var/lib/mysql
chown mysql.mysql /var/run/mysql
chmod 770 -R /var/run/mysql
/etc/rc.d/rc.mysqld start
these methods should do the trick
- 02-27-2007 #6Just Joined!
- Join Date
- Feb 2006
- Posts
- 17
A mysqld process already exists
Hi Volomir,
Sorry I have taken so long to get back to this question of mine and your help.
I started mysqld by typing: /etc/rc.d/rc.mysqld start
Now the prompt reads: A mysqld process alread exits.
What do I do now?
How do I actually get into sql now and start to create a database?
Forgive me for being so silly and dimwitted.
Do I have to have a server to create a database?
Your help is most appreciated.
Thanks
Michelle
- 03-04-2007 #7Just Joined!
- Join Date
- Feb 2006
- Posts
- 51
Did you try typing "mysql' at prompt . It apears your server has already started so that is the way you "start" the client side and use it.
mysql -u user -ppassword
and see what will happen
- 03-04-2007 #8Just Joined!
- Join Date
- Feb 2006
- Posts
- 17
Hi Igi_BG
Ok, I type mysql at the prompt and here's what I get.
Welcome to MySQL monitor. Commands end with .....
Your MySQL connection id is 3 to server version 5.0.27
type help ....
mysql>
I can type anything in there but nothing happens. How do I start making tables or querying a database from here? How do I install a database?
Thanks very much for your help mate!!! It is most appreciated!! p.s. I'm trying this on Fedora.
Michelle
- 03-06-2007 #9Just Joined!
- Join Date
- Feb 2006
- Posts
- 51
OK so you have a running mysql server and you can start mysql client. Now you have to read
. The "sql language" is quite simple. Search for tuts on the net or get the BIG MYSQL reference manual - it is all in it.
Good luck.
It doesn't matter it is on Fedora
- 03-06-2007 #10Just Joined!
- Join Date
- Feb 2006
- Posts
- 17
Hi Igi_BG
I got it working. I created the database, the tables. GREAT !! Thanks so much for your help.
I spent some time and did some searching and reading and it's working.
I no doubt will have more questions in the future.
Thanks again
Michelle


Reply With Quote