Working with databases
Coduva uses MariaDB 11.8 LTS as its database server. You do most database tasks on the Database screen; for more detailed work, phpMyAdmin opens with one click.
Connection details
| Field | Value |
|---|---|
| Server | 127.0.0.1 |
| Port | 3306 (or the new port if you changed it in Settings) |
| User | root |
| Password | Empty |
These details are also shown below the Database screen: "Connection: 127.0.0.1:3306 · user root · empty password". The MariaDB port is also shown in the status bar at the bottom; clicking it opens the Database screen.
Why is there no password?
MariaDB listens only on the 127.0.0.1 address; other computers on the network cannot connect to it. For local development, a root user with no password is both safe and practical. Do not change the root password: Coduva cannot stop services cleanly afterwards, and your projects' connection settings will break.
You can use the same details to connect from another tool (e.g. HeidiSQL, DBeaver, TablePlus).
Database screen
Open the Database screen from the Development group in the left menu. If MariaDB is not running, the message "MariaDB is not running." and the Start MariaDB button are shown.
Two buttons are at the top right of the screen: Backups folder opens the folder with the exported files, and phpMyAdmin opens phpMyAdmin in the browser (only while MariaDB is running).
The table shows the following for each database:
- Name
- Size
- Tables count
- Project — the Coduva project that uses the database
MariaDB's own system databases are not shown in the list.
Creating a database
- Enter a name (
database_name) in the name field above the table, e.g.blog. - Click Create database. The new database appears in the list.
The name can contain only letters, digits and underscores, up to 64 characters. Hyphens are not allowed.
For WordPress and Laravel projects, you do not need to do this step: Coduva creates the database itself when it creates the project. The name comes from the project name, with hyphens converted to underscores (musteri-sitesi → musteri_sitesi).
Exporting (backup)
- Click the Export button on the database's row.
- Coduva writes the database to a
.sqlfile and shows its path: "Exported: …".
The files are saved to this folder:
C:\Coduva\backups\db\<name>-<time>.sqlTo open the folder, use the Backups folder button at the top right of the screen.
Before risky operations
Before a plugin update, a migration or a URL change, make a quick backup with Export. Instant snapshots and restore are planned for v1.x.
Importing
You can import a .sql file into an existing database:
- If the target database does not exist, create it first.
- Click the Import button on its row.
- Select the
.sqlfile.
When the operation finishes, the message "Imported into blog." appears. If the tables in the file already exist in the target database, they may be overwritten depending on the file's contents. If you are not sure, export the target first.
If you are moving a database from another local server, see the migration guide.
Deleting
- Click the Delete button on the database's row.
- In the "Permanently delete blog?" dialog, type the database name exactly.
- Click the dialog's Delete button. The button is not enabled until the name matches exactly.
Cannot be undone
A deleted database cannot be recovered. Before deleting, make a backup with Export.
Removing a project from Coduva does not delete its database. If you want to delete the database, you must do so separately on this screen.
phpMyAdmin
Click the phpMyAdmin button on the Database screen, select the Open phpMyAdmin command with Ctrl+K, or select phpMyAdmin from the tray icon's left-click menu. The following address opens in the browser:
http://localhost/phpmyadmin/phpMyAdmin logs you in automatically; it does not ask for a username or password. It is accessible only from this computer.
In phpMyAdmin, you can edit table structures, run queries and browse data. To import large .sql files, prefer Coduva's Import button: the file is passed directly to the MariaDB client, it is not uploaded through the browser, and it is not subject to PHP's upload size limit.
From the command line
MariaDB's command-line client is in Coduva's MariaDB folder. This folder is not added to PATH in the project terminal; run the client using its full path (the version number depends on the installed version):
& "C:\Coduva\bin\mariadb\11.8.9\bin\mariadb.exe" -h 127.0.0.1 -P 3306 -u rootCoduva itself also uses the mariadb-dump.exe and mariadb.exe tools in this folder for exporting and importing.
For detailed reference, see the MariaDB and phpMyAdmin page.
Next step: Terminal, Composer and Node.js.