Yardım mysql => CREATE DATABASE player;

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

esenkara88

Üye
Üye
Mesaj
94
Çözümler
1
Beğeni
3
Puan
59
Ticaret Puanı
0
mysql> CREATE DATABASE player; ERROR 1006 (HY000): Can't create database 'player' (errno: 2) içeriği bu çözmedin veritabının sildim

Screenshot_13.webp

navicat içinde sadece information_schema var onun dışında başka hiçbir sey yok normal account vb klasör olurdu onlarda yok şuan onları oluşturduğum yukarıdaki hatta lı alıyorum
 
Çözüm
You seem to be successfully connected to MySQL and the database file path is /var/db/mysql you have probably caused a Query error.
The order of the commands you use to check that your server is running and that mysql.sock is in the right place is incorrect. You need to run these commands separately:

# ls /tmp/mysql.sock or ls /var/run/mysqld/mysql d/mysqld.sock
The "or" command here separates or MEANS. Such a working structure cannot exist. This is impossible..

The correct one is as follows.
Kod:
Genişlet Daralt Kopyala
ls /tmp/mysql.sock
ls /var/run/mysqld/mysqld/mysqld.sock

Try running the following commands (please in order !)
Kod:
Genişlet Daralt Kopyala
service mysql-server status
Share the result with me.

Kod:
Genişlet Daralt Kopyala
service mysql-server restart
Kod:
Genişlet Daralt Kopyala
less...
The database may not be installed or the default database installation directory may have been changed.

First check if the database is running. Use the following commands in the CLI.
Kod:
Genişlet Daralt Kopyala
service mysql-server status
ps aux | grep mysql
ls /tmp/mysql.sock or ls /var/run/mysqld/mysqld/mysqld.sock

then try to connect.
Kod:
Genişlet Daralt Kopyala
mysql -u root -p
Then type sudo find / -name my.cnf in the CLI. This will find the database directory where the database is installed if it exists and is running.

After finding the configuration file, check the value of the datadir parameter in the file. datadir specifies the SQL data directory. You can also use this command for short.

Kod:
Genişlet Daralt Kopyala
grep -i datadir /found directory/my.cnf
In this command, /found directory/my.cnf is the path to the my.cnf file you found in the previous step.

If you can't find the datadir parameter in my.cnf, or if you want to see what value this parameter uses when MySQL is running, use the command SHOW VARIABLES LIKE 'datadir'; or mysql -u root -p -e "SHOW VARIABLES LIKE 'datadir';".

After doing this, share the database log file with us instead of just writing a line of error code so that we can understand the error and problem and help you. An error can have more than one source and parent.

Also, before doing this, try to check /var/db/mysql and not var/lib/mysql if possible.

After all this, write here the ways in which you tried to create the database you are trying to create. If possible, share the SQL Query code.
yetkiler.webp

benim yetkimim var

hata 2.webp

burada ise account ve common gözükmüyor vb.
yukarıdaki komutları yazınca böyle sey cıkıyor
auto-rehash TRUE
auto-vertical-output FALSE
bind-address (No default value)
character-sets-dir (No default value)
column-type-info FALSE
comments FALSE
compress FALSE
debug-check FALSE
debug-info FALSE
database (No default value)
default-character-set auto
delimiter ;
enable-cleartext-plugin FALSE
vertical FALSE
force FALSE
named-commands FALSE
ignore-spaces FALSE
init-command (No default value)
local-infile FALSE
no-beep FALSE
host (No default value)
html FALSE
xml FALSE
line-numbers TRUE
unbuffered FALSE
column-names TRUE
sigint-ignore FALSE
port 0
prompt mysql>
quick FALSE
raw FALSE
reconnect TRUE
socket (No default value)
ssl FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-crl (No default value)
ssl-crlpath (No default value)
ssl-verify-server-cert FALSE
table FALSE
user (No default value)
safe-updates FALSE
i-am-a-dummy FALSE
connect-timeout 0
max-allowed-packet 16777216
net-buffer-length 16384
select-limit 1000
max-join-size 1000000
secure-auth TRUE
show-warnings FALSE
plugin-dir (No default value)
default-auth (No default value)
histignore (No default value)
binary-mode FALSE
connect-expired-password FALSE
root@altyapi:~ # root@altyapi:~ # ps aux | grep mysql
root@altyapi:~: Command not found.
root@altyapi:~ # mysql 534 0.0 0.0 9852 1780 ?? Is Mon09PM 0:00.0 2 /bin/sh /usr/l
mysql: No match.
root@altyapi:~ # mysql 8292 0.0 12.3 688140 450112 ?? S 2:50PM 0:04.0 9 /usr/local/lib
mysql: No match.
root@altyapi:~ # root 9234 0.0 0.0 9676 1640 2 RL+ 5:45PM 0:00.0 0 grep mysql
root: Command not found.
root@altyapi:~ # root@altyapi:~ # ls /tmp/mysql.sock or ls /var/run/mysqld/mysql d/mysqld.sock
root@altyapi:~: Command not found.
root@altyapi:~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 122
Server version: 5.6.34 Source distribution
mysql 534 0.0 0.0 9852 1780 ?? Is Mon09PM 0:00.02 /bin/sh /usr/l
mysql 8292 0.0 12.3 688140 450148 ?? I 2:50PM 0:04.15 /usr/local/lib
root 9271 0.0 0.0 9676 1696 2 R+ 5:49PM 0:00.00 grep mysql
(check /var/db/mysql/altyapi.pid).
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
aldığım hattalar bunlardır nasıl cözcem mi bilmediğim ve internet araştırdım bulmadım
 
You seem to be successfully connected to MySQL and the database file path is /var/db/mysql you have probably caused a Query error.
The order of the commands you use to check that your server is running and that mysql.sock is in the right place is incorrect. You need to run these commands separately:

# ls /tmp/mysql.sock or ls /var/run/mysqld/mysql d/mysqld.sock
The "or" command here separates or MEANS. Such a working structure cannot exist. This is impossible..

The correct one is as follows.
Kod:
Genişlet Daralt Kopyala
ls /tmp/mysql.sock
ls /var/run/mysqld/mysqld/mysqld.sock

Try running the following commands (please in order !)
Kod:
Genişlet Daralt Kopyala
service mysql-server status
Share the result with me.

Kod:
Genişlet Daralt Kopyala
service mysql-server restart
Kod:
Genişlet Daralt Kopyala
less /var/db/mysql/altapi.err
Share the result with me.

Kod:
Genişlet Daralt Kopyala
nano /usr/local/etc/mysql/my.cnf
Share the result with me. If it cannot find the nano command, try with ee. For example
Kod:
Genişlet Daralt Kopyala
ee /usr/local/etc/mysql/my.cnf

However, this method will make it easier to understand the problem, if you follow the steps correctly.
If it continues share me the altapi.err error log file or its contents so that I can solve the problem.
 
Son düzenleme:
Çözüm
Üst