# I have problem



## SaidABosood (Apr 22, 2016)

```
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
```
please help me


----------



## SirDice (Apr 22, 2016)

Select the right forum for new threads

How to ask questions the smart way: Be precise and informative about your problem


----------



## SaidABosood (Apr 22, 2016)

[QUOTE = "SirDice، في مرحلة ما بعد: 318199 عضو: 1677"] اختر المنتدى المناسب لمواضيع جديدة

كيفية طرح الأسئلة بطريقة ذكية: كن دقيقا ومتقنا عن مشكلتك [/ QUOTE]
شكرا أخي


SirDice said:


> Select the right forum for new threads
> 
> How to ask questions the smart way: Be precise and informative about your problem


i do not have understand  this page 
can you help me
please


----------



## zirias@ (Apr 22, 2016)

Well, answer is no, because you do not give any detail about what you tried and how you got to this message and what you expected instead. I understand this might be a language barrier. Maybe ask a friend who knows English well to translate for you?


----------



## SaidABosood (Apr 23, 2016)

Zirias said:


> Well, answer is no, because you do not give any detail about what you tried and how you got to this message and what you expected instead. I understand this might be a language barrier. Maybe ask a friend who knows English well to translate for you?


i have aproblem


----------



## DutchDaemon (Apr 23, 2016)

`service mysql-server start`

If that doesn't start MySQL, look in the .err file in /var/db/mysql for a reason.


----------



## scottro (Apr 23, 2016)

For those who didn't look at the image, the OP cd'd to an older version of a MySQL port, (5.1) and tried to run a mysql command.  

As Zirias said, you really may need someone with some English ability to help.  To start a MySQL session, you don't need to be in the port.  Have you installed a version of MySQL server?  Have you started it?  You probably have to start the service, assuming that you have a port installed. Your image shows that you're in the databases/mysql51-server which is fairly old.  (Though of course, you may have reasons for needing an older version.)

The error shows that the server isn't running.  Once you install a version of the MySQL server, you have to start it before running a command.  You will find, if you look in /usr/local/etc/rc.d a script called mysql-server. (I think, I'm not at a FreeBSD machine right now).  Whatever its name is--let's assume it's mysql-server, run the command
`/usr/local/etc/rc.d/mysql-server onestart`

If it starts successfully, you can try the command you posted in the image.


----------



## SirDice (Apr 25, 2016)

This seems appropriate: Handbook: Chapter 4. Installing Applications: Packages and Ports


----------

