Install MariaDB first, there is nothing special about this step.
>$ sudo pacman- Sy >$ sudo pacman -S extra/mariadb
After the installation is complete, pay attention to the prompts, which will ask us to initialize MariaDB.
sudo mariadb- install -db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Among them –datadir is the path where the database is located, I modified it to the path /home/mariadb.
Next, modify the configuration file and add the new database path.
>$ sudo vim /etc/my.cnf.d/ server.cnf [mysqld] datadir =/home/mariadb
Edit the /usr/share/mysql/policy/apparmor/usr.sbin.mysqld file and add the new path, otherwise the database service cannot be started.
Search for the default path of the database /var/lib/mysql in this file, and configure our new path in the same way.
The last step is to modify the service startup script, otherwise the service still cannot be started.
>$ sudo vim /lib/systemd/system/ mariadb.service ProtectHome = false
Change ProtectHome=true to ProtectHome=false.
Now you can start the database.
>$ sudo systemctl daemon- reload >$ sudo systemctl start mariadb # If you need to boot automatically, execute the following command >$ sudo systemctl enable mariadb
Read More:
- Creating test database for alias ‘postgres’… Got an error creating the test database: permission
- [Solved] There are test failures. Please refer to D:\Java_study\springboot\springboot-sugon-3\target\surefire-reports for the individual test results.
- Node Kubelet Error: node “xxxxx“ not found [How to Solve]
- [Solved] Qt Error: undefined reference to xxxxx
- [Solved] SpringBoot Project Start Error: No bean named ‘org.springframework.context.xxxxx.importRegistry‘ available
- [Solved] Android Networking error: CLEARTEXT communication to www.xxxxx.xyz not permitted by network security policy
- [Go] Solve can’t load package: cannot find module providing package github.com/xxxxx
- [Solved] SHELL Run Error: “-BASH: ./TEST.SH: /BIN/BASH^M: BAD INTERPRETER: NO SUCH FILE OR DIRECTORY”
- [Solved] docker: Error response from daemon: driver failed programming external connectivity on endpoint mysql-test …
- [Solved] Phone Debug Program Error: The application could not be installed: INSTALL_FAILED_TEST_ONLY
- Mavenzai install Error: There are test failures
- [Solved] Interface automation test: JSON parse error
- DB::Exception: test: Authentication failed: [How to Solve]
- JMeter JDBC Error: No pool found named: ‘test‘ [How to Solve]
- [Solved] Android Studio 3.0 Error: Error: INSTALL_FAILED_TEST_ONLY
- How to Solve golang test Error: # command-line-arguments [command-line-arguments.test]
- [Solved] Jmeter Connect Database Error: Cannot create PoolableConnectionFactory
- [Go] Testing when solving go test: warning: no tests to run
- [Solved] Junit.test use error: log4j:WARN No appenders could be found for logger
- Execute an error under pytest cmd make sure your test modules/packages have valid Python names.