MySql does not work

I’m using OpenSuse 12.3 32 and KDE

I’m trying to use MySQL, but this is the result

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

What should I do?

Did you do anything to start the mysql server? Or do you think it is running by magic? :wink:

I’m following instructions of the Site:

Installation from Source

For a new installation the next thing you will need to do is create your database and database users. So type the commands as follows when in the folder of the extracted zm files,

Create the ZoneMinder database ‘zm’ and populate it with the tables for ZoneMinder:
$ mysql
mysql> create database zm;
mysql> exit;
$ mysql zm < db/zm_create.sql <This file doesn’t exist until after ‘make’>

You mean they are wrong?
So, why “$ mysql” seems works for them?

Assuming you started mysql server (using systemctl or /etc/init.d/mysql), those commands should work.

You’re also not supposed to type the dollar sign ($). The sign just indicates terminal prompt. So the first command should just be “mysql”.

I tryed use the “/etc/init.d/mysql start”

linux-l78t:/home/sergio # /etc/init.d/mysql start redirecting to systemctl start mysql linux-l78t:/home/sergio # mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1 Server version: 5.5.33-MariaDB openSUSE package Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement. MariaDB (none)]>
Now it seems worked, but what is the “MariaDB” ? This does the same job?

MariaDB is a fork of mysql, initiated when Oracle took over Sun and was on the path of closing development, changing licenses etc. AFAIK the founder of mysql forked it himself.

MariaDB is a drop in replacement for MySQL up to version 5.5.n; for compatibility, it uses exactly the same commands as MySQL.

I tried using Mysql, but my real goal was to try to install the “zoneminder”, a software that manages IP cameras, and it uses Mysql.
However, this software is full of difficulties for my little knowledge and I’m giving it …

So I’m very grateful for information about MySql
If anyone knows anything about IP cameras with Linux, please let me know.


Normally you should be able to connect to the IP camera by just entering the IP address in your web browser. This should work in Linux as well.

Other than that, I guess you should describe what you actually want to do. And the model of your camera would help as well.
But better start a new thread for this, I’d say, since this has nothing to do with mysql anymore.