Mageia Linux Configuration Notes
This page contains some basic Mageia Linux Configuration Notes...
Page Listing:
- Allow Root Login ( KDE )
- Enable PHP to Connect to MariaDB (Mysql)
- Install and Configure phpMyAdmin
- Example - Basic SQL Commands in PHP
Allow Root Login ( KDE )
Open a Konsole (Terminal)
su -
( your root password required )
kwrite
Edit this file
/var/lib/mageia/kde4-profiles/Default/share/config/kdm/kdmrc
Find the Command line saying AllowRootLogin=false
change false to true AllowRootLogin=true
Save file and exit kwrite
Log out. You should now be able to log back in again as root user
Note: For security reasons, I would disconnect internet access while logged in as root. Do the work required as root, and then log back in again as a linux user
* Home
Enable PHP to Connect to MariaDB (Mysql)
Note:
In order to set your linux environment up as a web server load the Apache packages through the "Install & Remove Software" Management option
Mageia uses MariaDB instead of MySQL. Load the MariaDB packages through the "Install & Remove Software" Management option.
You can load other development packages such as perl and php through the "Install & Remove Software" Management option also.
How to enable php and MariaDB binding
The required packages to enable php to connect to MySQL are not included as part of the Mageia CD-ROM release Software. To add the required packages do the following.
Menu button -> Tools -> System Tools -> Mageia Control Center
Select: "Configure media sources for install and update"
There should be two selected (depending on your install selections)
CD ROM Core Release
CD ROM Nonfree Release
Click the Add button
A Repository of available Software packages will be loaded to your computer through this option.
Then go back and select "Install & Remove Software" and install the desired php-mysql packages.
If desirable, turn on php debugging by opening
/etc/php.ini
and ensure display_errors = On
To Check that a connection to MariaDB using php is possible try the following php test script:
Note: It's assumed login security has not been set for this script
For MariaDB, the output looks like this:
information_schema
mysql
performance_schema
test
* Home
Install and Configure phpMyAdmin
Ensure Repository Software packages are available on your computer (see above)
select "Install & Remove Software" and install the desired phpMyAdmin packages
The configuration file for phpMyAmin is: /etc/phpmyadmin/config.inc.php
Edit the configuration file as root user
To have access to phpMyAdmin as root with no password (assuming one has not been set)
Find the Command line saying: $cfg['Servers'][$i]['AllowNoPassword'] = false;
change false to true
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Log out. You should now be able to log back in and use phpMyAdmin as root with no password
* Home
Example - Basic SQL Commands in PHP
Note:
The below script shows how to execute basic SQL commands in PHP through a HTML page.
There is no security with these examples
The database table is a simple "Primary key", "First Name" and "Last Name" table