Score:0

install word press in my ubuntu 22.04

cn flag

I have been tried many ways to install WordPress in my Ubuntu 22.04 but always i received errors, and also it has not been installed yet m please let me know how to solve it


This is about mysql information

alireza@OptiPlex-5090:~$ mysql --version
mysql  Ver 15.1 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper

alireza@OptiPlex-5090:~$ sudo apt-get install mysql-server
[sudo] password for alireza: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  galera-4 libconfig-inifiles-perl libdaxctl1 libdbd-mysql-perl libdbi-perl
  libmariadb3 libmysqlclient21 libndctl6 libpmem1 libterm-readkey-perl
  liburing2 socat
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
  mysql-server-core-8.0
Suggested packages:
  mailx tinyca
The following packages will be REMOVED:
  mariadb-client mariadb-client-10.6 mariadb-client-core-10.6 mariadb-server
  mariadb-server-10.6 mariadb-server-core-10.6
The following NEW packages will be installed:
  mysql-client-8.0 mysql-client-core-8.0 mysql-server mysql-server-8.0
  mysql-server-core-8.0
0 upgraded, 5 newly installed, 6 to remove and 0 not upgraded.
Need to get 0 B/21.6 MB of archives.
After this operation, 35.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
dpkg: warning: files list file for package 'mysql-apt-config' missing; assuming package has no files currently installed
(Reading database ... 412208 files and directories currently installed.)
Removing mariadb-client (1:10.6.12-0ubuntu0.22.04.1) ...
Removing mariadb-server (1:10.6.12-0ubuntu0.22.04.1) ...
Removing mariadb-server-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing mariadb-client-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing mariadb-client-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Removing mariadb-server-core-10.6 (1:10.6.12-0ubuntu0.22.04.1) ...
Selecting previously unselected package mysql-client-core-8.0.
dpkg: warning: files list file for package 'mysql-apt-config' missing; assuming package has no files currently installed
(Reading database ... 411880 files and directories currently installed.)
Preparing to unpack .../mysql-client-core-8.0_8.0.32-0ubuntu0.22.04.2_amd64.deb ...
Unpacking mysql-client-core-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Selecting previously unselected package mysql-client-8.0.
Preparing to unpack .../mysql-client-8.0_8.0.32-0ubuntu0.22.04.2_amd64.deb ...
Unpacking mysql-client-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Selecting previously unselected package mysql-server-core-8.0.
Preparing to unpack .../mysql-server-core-8.0_8.0.32-0ubuntu0.22.04.2_amd64.deb ...
Unpacking mysql-server-core-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Selecting previously unselected package mysql-server-8.0.
Preparing to unpack .../mysql-server-8.0_8.0.32-0ubuntu0.22.04.2_amd64.deb ...
Downgrade from (at least) 10.6 to 5.7 is not possible.
Warning: /etc/mysql/FROZEN already exists
MySQL has been frozen to prevent damage to your system. Please see /etc/mysql/FROZEN for help.
Unpacking mysql-server-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_8.0.32-0ubuntu0.22.04.2_all.deb ...
Unpacking mysql-server (8.0.32-0ubuntu0.22.04.2) ...
Setting up mysql-client-core-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Setting up mysql-server-core-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Setting up mysql-client-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Setting up mysql-server-8.0 (8.0.32-0ubuntu0.22.04.2) ...
Installing new version of config file /etc/mysql/debian-start ...
MySQL has been frozen to prevent damage to your system. Please see /etc/mysql/FROZEN for help.
Setting up mysql-server (8.0.32-0ubuntu0.22.04.2) ...
Processing triggers for man-db (2.10.2-1) ...

alireza@OptiPlex-5090:~$ sudo service mysql start

alireza@OptiPlex-5090:~$ sudo service mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUC>
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop the mysq>
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the mysql>
lines 1-9/9 (END)...skipping...
● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the mysql database server daemon.
lines 1-9/9 (END)

● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the mysql database server daemon.
lines 1-9/9 (END)

● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status>
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop th>
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the>
lines 1-9/9 (END)

● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUC>
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop the mysq>
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the mysql>
lines 1-9/9 (END)

● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the mysql database server daemon.
lines 1-9/9 (END)

● mysql.service - LSB: Start and stop the mysql database server daemon
     Loaded: loaded (/etc/init.d/mysql; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2023-04-11 10:06:27 +03; 7s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 38901 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
        CPU: 1ms

Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
Apr 11 10:06:27 OptiPlex-5090 systemd[1]: Started LSB: Start and stop the mysql database server daemon.
lines 1-9/9 (END)

alireza@OptiPlex-5090:~$ mysql -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
alireza@OptiPlex-5090:~$ 
ar flag
Does this answer your question? [WordPress Installation Failed](https://askubuntu.com/questions/941928/wordpress-installation-failed)
in flag
Your `Error 2002` is because you are trying to sign in as `root` directly. This has not been possible with MySQL for 7+ years. You will need to connect like this: `sudo mysql`. You do not need to enter a username as part of this process.
cn flag
alireza@OptiPlex-5090:~$ sudo mysql [sudo] password for alireza: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) alireza@OptiPlex-5090:~$
ar flag
@Alireza Please [edit your original question](https://askubuntu.com/posts/1463197/edit) and add new information. Don't post additions as answers. They don't answer your question.
cn flag
I try to do same as your commend but i see following : alireza@OptiPlex-5090:~$ sudo mysql [sudo] password for alireza: sudo: mysql: command not found
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.