169 похожих чатов

It is a tmpfs so it's normal for it to

appear and disappear. Do you have an error message or a problem?

9 ответов

14 просмотров

I thought so because it's oracle cloud free tier I think it's something like 1Gb of ram

so I accidentally removed mysql package there and I can't seem to start mysql.service after reinstall and all google and stackoverflow saying is I need to match the .sock file but I can't find where it is

Canor
so I accidentally removed mysql package there and ...

Did you install mysql separately or with xampp?

Velan Chandrasekar
Did you install mysql separately or with xampp?

separately by sudo apt install mysql-server. should I try installing xampp?

Canor
separately by sudo apt install mysql-server. shoul...

No. that's your choice. And, if that command didn't give you any error, you should be able to use mysql without any issues. Guess your service need to be started again, after installation. Try this: sudo service mysqld start. If you still couldn't, see if you have file(s) named do rm -rf /var/lib/mysql/ib_logfile* (* intended). And then, restart mysql with systemctl restart mysql.

Velan Chandrasekar
No. that's your choice. And, if that command didn'...

thank you so much for your advice. Here's what I tried so far. hope it's not too redundant. - I tried to remove package completely by sudo apt-get purge mysql-server mysql-client and sudo rm -rf /var/lib/mysql - after rebooting instance I installed mysql-server by sudo apt update; sudo apt install -y mysql-server - and after sudo reboot, I tried sudo mysql_secure_installation: failed - sudo service mysqld start returned Failed to restart mysqld.service: Unit mysqld.service not found. - sudo service mysql start returned Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. journalctl -xe shows Apr 23 23:37:00 instance-20-04 sshd[4603]: Received disconnect from 112.169.84.32 port 42918:11: disconnected by user Apr 23 23:37:00 instance-20-04 sshd[4603]: Disconnected from user canor 112.169.84.32 port 42918 - I tried to check if mysql is configured correctly but /etc/mysql doesn't exist, nor does /var/run/mysqld or /var/lib/mysqld, but sudo apt install mysql-server didn't return any error message while installation. - /var/log/mysqld doesn't exist either. - ib_logfile* can't be there as I removed the whole directory before reinstall. - so I mkdired /etc/mysql and sudo vi /etc/mysql/my.cnf adding configuration as below user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 #basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp #lc-messages-dir= /usr/share/mysql skip-external-locking - now sudo journal -xe shows Apr 23 23:52:32 instance-20-04 sudo[5495]: pam_unix(sudo:session): session opened for user root by canor(uid=0) Apr 23 23:52:34 instance-20-04 systemd[1]: mysql.service: Start request repeated too quickly. Apr 23 23:52:34 instance-20-04 systemd[1]: mysql.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit mysql.service has entered the 'failed' state with result 'exit-code'. Apr 23 23:52:34 instance-20-04 systemd[1]: Failed to start MySQL Community Server. -- Subject: A start job for unit mysql.service has failed -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- A start job for unit mysql.service has finished with a failure. -- -- The job identifier is 5157 and the job result is failed. Apr 23 23:52:34 instance-20-04 sudo[5495]: pam_unix(sudo:session): session closed for user root - As far as I can think, line PIDFile=/var/run/mysqld/mysqld.pid in /lib/systemd/system/mysql.service is causing problem as there isn't such directory, and .pid file but I have no idea how to handle this. your advice would be very appreciated. thanks!

Canor
thank you so much for your advice. Here's what I t...

You've mentioned that you ran sudo apt-get purge on both mysql-server & mysql-client. But, you've stated of running only sudo apt install -y mysql-server. I'm not sure if you've installed the client too, but the fact that you /etc/mysql doesn't exist would actually mean that you haven't installed the client. Try the purge again & install both the server & the client. After this, you should be able to see both /etc/mysql and /lib/systemd/system/mysql.service. (The advice on creating the /var/run/mysqld was given (I guess, you got it from SO or some other forum), only because it's a temp folder (created @ run-time). It might have been marked as read-only folder due to some user restrictions & so it's possible that your current user couldn't create the file at run-time. Hence the recommendation, to create it manually. However, It is not advisable (nor is of any help) to create the system/application folders like /etc/mysql, as they're created during installation & hence become the proof that you have the application installed. Refrain from creating these folders & be cautious about removing them too.)

Velan Chandrasekar
You've mentioned that you ran sudo apt-get purge o...

thank you so much for your help. I removed /var/lib/mysql /lib/mysql and /etc/init.d/mysql after purging mysql-server mysql-client, and reinstalling mysql-server and mysql-client somehow made it work. maybe old data in /lib/mysql was causing the issue? anyway issue solved thanks to you!!

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
в JclConsole объявлено так: function CtrlHandler(CtrlType: DWORD): BOOL; stdcall; - где ваше объявление с stdcall? у вас на картинке нет stdcall
Karagy
8
Как передать управляющий символ в открытую через CreateProcess консоль? Собсна, есть процедура: procedure TRedirectThread.WriteData(Data: OEMString); var Written: Cardinal;...
Serjone
6
Ребят в СИ можно реализовать ООП?
Николай
33
program test; {$mode delphi} procedure proc(v: int32); overload; begin end; procedure proc(v: int64); overload; begin end; var x: uint64; begin proc(x); end. Уж не знаю...
notme
6
у вас два процесса. один посылает другому сигнал. у вас есть код обоих процессов? если всё не так - расскажите как оно на самом деле. а именно кто кому чего, есть-ли консоли,...
Karagy
6
Карта сайта