MySQL error

Hello everyone I am totally new to MySQL and I do not know how to deal with the following problem:
I want to run MySQL server but there occurs following error:

akalogix:/ # mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysql/mysql.sock’ (2)

can anyone tell me what to do. P.S: I am developing Java applications and I am totally new to MySQL. I will appreciate anyone who can suggest any readings.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The ‘mysql’ command is for the client. Is the server running as well? On
the same box or elsewhere?

ps aux | grep -i mysql
netstat -planet | grep :3306
mysql -h localhost

Good luck.

On 10/29/2010 10:06 AM, agajantorayev wrote:
>
> Hello everyone I am totally new to MySQL and I do not know how to deal
> with the following problem:
> I want to run MySQL server but there occurs following error:
>
> akalogix:/ # mysql
> ERROR 2002 (HY000): Can’t connect to local MySQL server through socket
> ‘/var/run/mysql/mysql.sock’ (2)
>
> can anyone tell me what to do. P.S: I am developing Java applications
> and I am totally new to MySQL. I will appreciate anyone who can suggest
> any readings.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMyvP0AAoJEF+XTK08PnB5JlAP/R3sjv4EGnheShc0sCdxrYBH
CeNp7BMiU9yilHpbPRR4NK0XX/6fJb7x5rce1sAYZT3OcxTrt3PqcyAYD6bXYCvO
NJ9gTBbQM+b6XghpD791gjNZ/18ahatY17H/Yhy+PqhYJos6GtjP+pgI2kUC0ww5
AnwecpK6f1aZkTVGp7onTFdcTXksHGZQ9Y9OQpYc02TBfXpir8kWM9cpZZxW+f0W
ZO8uqtt0Shaz6QnUroxbjRJaXej6DIwqug7yXpb+3XLDPvhPv7F3mwyyvZVpvhgD
rgu5zKMZEy2wOt8AFpaGXBp3TpUBMUna12Q9z4oDwobY0V/6lSXlzkbYx9JIgx8V
Z3CLc1f4GEPjJzDhL+q5b0+ZFd3wXA5tngKZxSZU6DoUdWK55kBIFYkl6iA55phi
CjeRxUZAkfKS0ueYxvgX6Dthi4AydjU0kXrrMwn3s8Vv2pNZYw8bnCx94gmb8XHr
lV8n8IpCf8rsYK4i1LHsUlOZwbTBJVWj9XIUjWJf+H7rtjl1nRGkD85RoBzDAD3R
dJbBcNpO9buHdK0Xym5bPY71CzIk0JWyzs4v5mgZz/6/S4D/+fk26h3jt30bkf7X
UcMt6lJGDsfeIeYwgswyU7xP1Y/Zr0MO4HKD2U5q41ftYIbSuK9i0xJruFynm6ba
zEhCxlkm9BlCZqKVAFQa
=hIW5
-----END PGP SIGNATURE-----

I do not know anything about MySQL and I have no any idea what to do? I have just finished core JAVA and started learning Accessing Databases with JDBC, so I installed MySQL and Connector/J. Does anyone know any tutorial or any reading about installation, setting up MySQL and using it with JDBC???

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The commands I sent last time were meant to be run. Sorry if that was not
clear. Run them and post the output.

To connect to MySQL (or any database) I like DB Visualizer which is a
great free, cross-platform tool. Give it a try.

Good luck.

On 10/29/2010 11:36 AM, agajantorayev wrote:
>
> I do not know anything about MySQL and I have no any idea what to do? I
> have just finished core JAVA and started learning Accessing Databases
> with JDBC, so I installed MySQL and Connector/J. Does anyone know any
> tutorial or any reading about installation, setting up MySQL and using
> it with JDBC???
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMywu+AAoJEF+XTK08PnB5o68P/14vrZ+hR2TVw9KBK/RYnIhs
1kaR/C/UHRhNAQq5RCcojOS6Oho2WVD9tPobErMKzKelF5wqxHJ6S/dontm21FpP
dFlpC5vaOgM1UnWkfnaNiRAKHbzsqPy9TiZURQopfCHBtC4mWyXf6hDMkYFaTsfw
HtBCxhbWxit9V5rad1hzfk6ENY+ypb965kQT2g0yXKckbxAgRu/8w7GNwsqrMLs/
g/pI5tSv0omPBYt6OHV63SE3GE7L08h0MFb35fWNag0Cav6qNog+vjVhM8loI9HH
8mLy9kQNfIk4nvuchh1NIkuYiob7lRgSynaPZi+geq6notVW0lxwQ9Nvnv0A7z5c
GWiMA0hqN56+HFmteQQYwkxVRme8YSmJKOhrEKS6Oj5NXfOMvv/enylUOzntsFac
EZVlp/yGs8cZIbM5crNab9Ulhlz2wp5JqoopfktjtEdjDugf5rUBR10+mPF2atUF
96iKMlDzN6MwD/KEITG3guX9v9hJpZEv+RryP1xXhjveEtqrzRDB4SJ2Fx0DxA11
CfqsWy2JmsjSpBRnuVVwOxh9Jo5eCXkdX/El/nqRn9hPA3Pq8mtDGqNWVDiHbAxc
wo0HDPAIffkbl92EUpTOCz9u9v3VMdFXxd1sdJciyJ5vOHuVzDzHLDP6bjgW5JP4
UUgaxGDqjLT31tJi39X4
=RZrm
-----END PGP SIGNATURE-----

On Fri, 29 Oct 2010 23:06:02 +0530, agajantorayev
<agajantorayev@no-mx.forums.opensuse.org> wrote:

>
> I do not know anything about MySQL and I have no any idea what to do? I
> have just finished core JAVA and started learning Accessing Databases
> with JDBC, so I installed MySQL and Connector/J. Does anyone know any
> tutorial or any reading about installation, setting up MySQL and using
> it with JDBC???
>
>

MySQL documentation at http://dev.mysql.com/doc/ , in particular the
‘topic guide’ at http://dev.mysql.com/doc/index-topic.html come to mind.
i’m sure there’s tutorials, etc., to be found, but i didn’t use any. i
found that from the docs at mysql.com i can figure out whatever i need.


phani.

Set mysql to start in Yast - System - Runlevel Editor.

For the rest, read the docs provided. You have to learn the basics about the components you’re going to use. That’s far beyond some replies in these forums.

linux-mfne:~ # ps aux | grep -i mysql
root 3234 0.0 0.0 2656 164 pts/2 D+ 00:02 0:00 grep -i mysql

linux-mfne:~ # netstat -planet | grep :3306
#no output

linux-mfne:~ # mysql -h localhost
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysql/mysql.sock’ (2)

what then???

Thanks it works :slight_smile:

On Sat, 30 Oct 2010 00:36:01 +0530, Knurpht
<Knurpht@no-mx.forums.opensuse.org> wrote:

> Set mysql to start in Yast - System - Runlevel Editor.

if you’re using a recent version of openSUSE and installed MySQL from oS
repos, you can start the mysql server by typing “rcmysql start” in a root
terminal. as far as i remember, the MySQL docs don’t explain how to do
that, but expect you to have a running instance of that server available.
the next step should be to create user accounts and secure the
installation, according to the ‘getting started’ guide on mysql.com.

to have mysql start every time you start openSUSE, you’ll have to enable
it in the runlevel editor, as knurpht wrote.


phani.