Bitnami MariaDB for Huawei Enterprise Cloud

Similar documents
Bitnami MySQL for Huawei Enterprise Cloud

Bitnami Apache Solr for Huawei Enterprise Cloud

Bitnami MEAN for Huawei Enterprise Cloud

Bitnami JRuby for Huawei Enterprise Cloud

Bitnami Kafka for Huawei Enterprise Cloud

Bitnami Ruby for Huawei Enterprise Cloud

Bitnami Cassandra for Huawei Enterprise Cloud

Bitnami HHVM for Huawei Enterprise Cloud

Bitnami Node.js for Huawei Enterprise Cloud

Bitnami Pimcore for Huawei Enterprise Cloud

Bitnami Piwik for Huawei Enterprise Cloud

Bitnami Moodle for Huawei Enterprise Cloud

Bitnami Tiny Tiny RSS for Huawei Enterprise Cloud

Bitnami ez Publish for Huawei Enterprise Cloud

Bitnami ProcessMaker Community Edition for Huawei Enterprise Cloud

Bitnami Re:dash for Huawei Enterprise Cloud

Bitnami OroCRM for Huawei Enterprise Cloud

Bitnami TestLink for Huawei Enterprise Cloud

Bitnami Dolibarr for Huawei Enterprise Cloud

Bitnami ERPNext for Huawei Enterprise Cloud

Bitnami Coppermine for Huawei Enterprise Cloud

Bitnami Open Atrium for Huawei Enterprise Cloud

Bitnami Mantis for Huawei Enterprise Cloud

Bitnami Spree for Huawei Enterprise Cloud

Bitnami OSQA for Huawei Enterprise Cloud

Bitnami JFrog Artifactory for Huawei Enterprise Cloud

Bitnami DokuWiki for Huawei Enterprise Cloud

Bitnami Trac for Huawei Enterprise Cloud

Bitnami Magento for Huawei Enterprise Cloud

Bitnami Phabricator for Huawei Enterprise Cloud

Bitnami MediaWiki for Huawei Enterprise Cloud

Bitnami Subversion for Huawei Enterprise Cloud

BriCS. University of Bristol Cloud Service Simulation Runner. User & Developer Guide. 1 October John Cartlidge & M.

How To Start Mysql Using Linux Command Line Client In Ubuntu

How To Start Mysql Use Linux Command Line Client In Ubuntu

SUREedge DR Installation Guide for Windows Hyper-V

How to recover a lost administrator password?

SUREedge MIGRATOR INSTALLATION GUIDE FOR HYPERV

Author A.Kishore/Sachin WinSCP

Linux Network Administration. MySQL COMP1071 Summer 2017

SUREedge MIGRATOR INSTALLATION GUIDE FOR NUTANIX ACROPOLIS

MassTransit 6.0 Installation Guide for Enterprise and Professional Servers on Macintosh

How To Start Mysql Use Linux Command Line Client In Xampp

PCoIP Connection Manager for Amazon WorkSpaces

WinSCP. Author A.Kishore/Sachin

Creative assets management. MySQL Install Guide

RESETTING MYSQL ROOT PASSWORDS

Mysql Tutorial Create Database Username Password Through Phpmyadmin

SUREedge MIGRATOR INSTALLATION GUIDE FOR VMWARE

Session 1: Accessing MUGrid and Command Line Basics

Buzztouch Server 2.0 with Amazon EC2

Support Backups and Secure Transfer Server Changes - i-cam

MySQL 5.x on QNX Neutrino OS Step-by-step installation manual

LiveNX Upgrade Guide from v5.2.0 to v5.2.1

Getting Started with MySQL

KB How to upload large files to a JTAC Case

Ricoh Managed File Transfer (MFT) User Guide

Setting up PuTTY. Version Updated for 2015 Fall (with corrections)

Setting up PuTTY. Software* Downoad PuTTY. Download PuTTY Download the putty.zip file. It contains several programs for SSH, SFTP, and SCP.

Archivists Toolkit Internal Database

VMware AirWatch Database Migration Guide A sample procedure for migrating your AirWatch database

Setting up PuTTY. CTEC1767 Data Communications & Networking CTEC1863 Operating Systems CTEC1906 Internet Computing

1. INTRODUCTION to AURO Cloud Computing

Ftp Command Line Manual Windows User Password

Winscp System Error. Code 3. The System Cannot Find The Path Specified

Mysql Create Schema From Sql File Command Line Windows

Sputnik Installation and Configuration Guide

Windows Backup Server Installation

Administration Manual

Online Backup Client User Manual

Mysql Manual Error Log Location Windows Server

VIRTUAL GPU LICENSE SERVER VERSION , , AND 5.1.0

Setting up PuTTY. Software* Download PuTTY 6/9/18. Microsoft Windows 7 (64-bit) PuTTY 0.70 (64-bit) PuTTYgen 0.70 (64-bit) WinSCP 5.13.

Cloudera s Enterprise Data Hub on the Amazon Web Services Cloud: Quick Start Reference Deployment October 2014

Open a browser and download the Apache Tomcat 7 and Oracle JDBC 6 JAR from these locations. The Oracle site may require that you register as a user.

MySQL Database Backup and Restore for Windows

IBM Operational Decision Manager Version 8 Release 5. Configuring Operational Decision Manager on WebLogic

Aware IM Version 8.1 Installation Guide

Password Reset Utility. Configuration

Student Website Setup

BACKUP APP V7 MYSQL DATABASE BACKUP AND RESTORE FOR WINDOWS

MassTransit Server Installation Guide for Windows

Storage Manager 2018 R1. Installation Guide

Parallel Programming Pre-Assignment. Setting up the Software Environment

Policy Manager for IBM WebSphere DataPower 7.2: Configuration Guide

Ekran System v.6.0 Privileged User Accounts and Sessions (PASM)

Administration Manual

Install and upgrade Qlik Sense. Qlik Sense 3.2 Copyright QlikTech International AB. All rights reserved.

Bitnami ELK for Huawei Enterprise Cloud

Zend Server Cluster Manager 5.5 Beta. Installation Guide. By Zend Technologies.

Lab Zero: A First Experiment Using GENI and Jacks Tool

Zend Server Cluster Manager 5.x Installation Guide

Message Networking 5.2 Administration print guide

Kaivos User Guide Getting a database account 2

Bomgar Vault Server Installation Guide

Troubleshooting Cisco APIC-EM Single and Multi-Host

Dell Protected Workspace Management

1. INTRODUCTION to Object Storage

Dell Storage Manager 2016 R3 Installation Guide

Telnet/SSH. Connecting to Hosts. Internet Technology 1

Transcription:

Bitnami MariaDB for Huawei Enterprise Cloud First steps with the Bitnami MariaDB Stack Welcome to your new Bitnami application running on Huawei Enterprise Cloud! Here are a few questions (and answers!) you might need when first starting with your application. What is the administrator password? To obtain the administrator password, click the "Remote Login" menu option next to the server name in the Huawei Cloud Server Console. This will launch a new browser window with an encrypted login session. The application password will be displayed on the login welcome screen. What SSH username should I use for secure shell access to my application? SSH username: root Description MariaDB is an open source, community-developed SQL database server that is widely in use around the world due to its enterprise features, flexibility, and collaboration with leading tech firms. How to start or stop the services? Each Bitnami stack includes a control script that lets you easily stop, start and restart services. The script is located at /opt/bitnami/ctlscript.sh. Call it without any service name arguments to start all services: sudo /opt/bitnami/ctlscript.sh start Or use it to restart a single service, such as Apache only, by passing the service name as argument:

sudo /opt/bitnami/ctlscript.sh restart apache Use this script to stop all services: sudo /opt/bitnami/ctlscript.sh stop Restart the services by running the script without any arguments: sudo /opt/bitnami/ctlscript.sh restart Obtain a list of available services and operations by running the script without any arguments: sudo /opt/bitnami/ctlscript.sh How to upload files to the server with SFTP? NOTE: Bitnami applications can be found in /opt/bitnami/apps. When uploading files via SFTP, you must have the server's IP address, username and password or, if you chose to deploy the server with an SSH key instead of a password, you must have the server username and corresponding SSH private key in.ppk format (for Windows) or in.pem format (for Linux and Mac OS X). To obtain the IP address for your server, follow these steps: Log in to the Huawei Cloud Server Console. Navigate to the "Computing -> Elastic Cloud Server" section. Note the public IP address for the server you wish to connect to.

Once you have confirmed that you have the IP address and correct SSH credentials for your server, follow the instructions below depending on the platform you wish to use. Although you can use any SFTP/SCP client to transfer files to your server, this guide documents FileZilla (Windows, Linux and Mac OS X), WinSCP (Windows) and Cyberduck (Mac OS X). Using an SSH Key Once you have your server's SSH key, choose your preferred application and follow the steps below to connect to the server using SFTP. FileZilla IMPORTANT: To use FileZilla, your server private key should be in PPK format. Follow these steps: Download and install FileZilla. Launch FileZilla and use the "Edit -> Settings" command to bring up FileZilla's configuration settings. Within the "Connection -> SFTP" section, use the "Add keyfile" command to select the private key file for the server. FileZilla will use this private key to log in to the server.

Use the "File -> Site Manager -> New Site" command to bring up the FileZilla Site Manager, where you can set up a connection to your server. Enter your server host name and specify bitnami as the user name. Select "SFTP" as the protocol and "Ask for password" as the logon type.

Use the "Connect" button to connect to the server and begin an SFTP session. You might need to accept the server key, by clicking "Yes" or "OK" to proceed. You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window. If you have problems accessing your server, get extra information by use the "Edit -> Settings -> Debug" menu to activate FileZilla's debug log.

WinSCP IMPORTANT: To use WinSCP, your server private key should be in PPK format. Follow these steps: Download and install WinSCP. Launch WinSCP and in the "Session" panel, select "SFTP" as the file protocol. Enter your server host name and specify bitnami as the user name.

Click the "Advanced " button and within the "SSH -> Authentication -> Authentication parameters" section, select the private key file for the server. WinSCP will use this private key to log in to the server.

From the "Session" panel, use the "Login" button to connect to the server and begin an SCP session. You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window. If you need to upload files to a location where the bitnami user doesn't have write permissions, you have two options: Once you have configured WinSCP as described above, click the "Advanced " button and within the "Environment -> Shell" panel, select sudo su - as your shell. This will allow you to upload files using the administrator account.

Upload the files to the /home/bitnami directory as usual. Then, connect via SSH and move the files to the desired location with the sudo command, as shown below: Cyberduck $ sudo mv /home/bitnami/uploaded-file /path/to/desired/location/ IMPORTANT: To use Cyberduck, your server private key should be in PEM format. Follow these steps: Select the "Open Connection" command and specify "SFTP" as the connection protocol.

In the connection details panel, under the "More Options" section, enable the "Use Public Key Authentication" option and specify the path to the private key file for the server.

Use the "Connect" button to connect to the server and begin an SFTP session. You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window. Using a Password Once you have your server's SSH credentials, choose your preferred application and follow the steps below to connect to the server using SFTP. FileZilla Follow these steps: Download and install FileZilla. Launch FileZilla and use the "File -> Site Manager -> New Site" command to bring up the FileZilla Site Manager, where you can set up a connection to your server. Enter your server host name.

文档名词文档密级 Select "SFTP" as the protocol and "Ask for password" as the logon type. Use bitnami as the server username and the password generated during the server deployment process. Use the "Connect" button to connect to the server and begin an SFTP session. You might need to accept the server key, by clicking "Yes" or "OK" to proceed. You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window. If you have problems accessing your server, get extra information by use the "Edit -> Settings -> Debug" menu to activate FileZilla's debug log.

WinSCP Follow these steps: Download and install WinSCP. Launch WinSCP and in the "Session" panel, select "SFTP" as the file protocol. Enter your server host name and set bitnami as the server username.

From the "Session" panel, use the "Login" button to connect to the server and begin an SCP session. Enter the password when prompted. You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

Cyberduck 文档名词文档密级 Follow these steps: Select the "Open Connection" command and specify "SFTP" as the connection protocol. In the connection details panel, enter the server IP address, bitnami as the username, and the password generated during the deployment process.

Use the "Connect" button to connect to the server and begin an SFTP session. You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window. What is the default configuration? The grant tables define the initial MariaDB user accounts and their access privileges. The default configuration consists of: A privileged account with a username of root. The root user has remote access to the database. An anonymous user without remote access to the database server. This user can only connect from the local machine and it is only intended for testing. A test database only intended for testing.

Check our recommendations for a production server. MariaDB version In order to see which MariaDB version are your machine running you can execute the following command: mysqld --version MariaDB configuration file The MariaDB configuration file is located at /opt/bitnami/mariadb/my.cnf. The MariaDB official documentation has more details about how to configure the MariaDB database. MariaDB socket On Unix, MariaDB clients can connect to the server in the local machine using an Unix socket file at /opt/bitnami/mariadb/tmp/mysql.sock. MariaDB port The default port for MariaDB is 3306. MariaDB Process Identification Number The MariaDB.pid file allows other programs to find out the PID (Process Identification Number) of a running script. Find it at /opt/bitnami/mariadb/data/mysqld.pid. MariaDB error log The log-error file contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running. If mysqld notices a table that needs to be automatically checked or repaired, it writes a message to the error log. Find it at /opt/bitnami/mariadb/data/mysqld.log. How to connect to the MariaDB database?

You can connect to the MariaDB database from the same computer where it is installed with the mysql client tool. mysql -u root -p You will be prompted to enter the root user password. This is the same as the application password. How to find the database credentials Database username: root. Database password: The same as the application password. Find out how to obtain application credentials. How to connect to MariaDB from a different machine? To connect to MariaDB from a different machine, you must open port 3306 for remote access. Refer to the FAQ for more information on this. Then, use the command below and replace SERVER-IP with the IP address of the server hosting the database. mysql -h SERVER-IP -u root -p You will be prompted to enter the root user password. This is the same as the application password. How to create a database for a custom application? These are the basic steps to create a new database and user for your applications: Create a new database: mysql> create database DATABASE_NAME;

Query OK, 1 row affected (0.00 sec) Create a new user (only with local access) and grant privileges to this user on the new database: mysql> grant all privileges on DATABASE_NAME.* TO 'USER_NAME'@'lo calhost' identified by 'PASSWORD'; Query OK, 1 row affected (0.00 sec) Create a new user (with remote access) and grant privileges to this user on the new database: mysql> grant all privileges on DATABASE_NAME.* TO 'USER_NAME'@'%' identified by 'PASSWORD'; Query OK, 1 row affected (0.00 sec) After modifying the MySQL grant tables, execute the following command in order to apply the changes: mysql> flush privileges; Query OK, 1 row affected (0.00 sec) Some applications require specific privileges in the database. Consult the official installation steps in the application's documentation. How to reset the MariaDB root password? Please note that depending on the version you have installed, you may find the MariaDB files at /opt/bitnami/mysql If you don't remember your MariaDB root password, you can follow the steps below to reset it to a new value: Create a file in /home/bitnami/mysql-init with the content shown below (replace NEW_PASSWORD with the password you wish to use): UPDATE mysql.user SET Password=PASSWORD('NEW_PASSWORD') WHERE Use r='root';

FLUSH PRIVILEGES; Stop the MariaDB server: sudo /opt/bitnami/ctlscript.sh stop mariadb Start MariaDB with the following command: sudo /opt/bitnami/mariadb/bin/mysqld_safe --defaults-file=/opt/bi tnami/mariadb/my.cnf --pid-file=/opt/bitnami/mariadb/data/mysqld. pid --init-file=/home/bitnami/mysql-init 2> /dev/null & Restart the MariaDB server: sudo /opt/bitnami/ctlscript.sh restart mariadb Remove the init script rm /home/bitnami/mysql-init How to change the MariaDB root password? You can modify the MariaDB password using the following command at the shell prompt: /opt/bitnami/mariadb/bin/mysqladmin -p -u root password NEW_PASSWORD How to create a database backup? To back up only the database, create a dump file using the mysqldump tool. mysqldump -u root -p DATABASE_NAME > backup.sql This operation could take some time depending on the database size. How to restore a database backup?

Once you have the backup file, you can restore it with a command like the one below: mysql -u root -p DATABASE_NAME < backup.sql If you want to restore the database and the database schema does not exist, it is necessary to first follow the steps described below. As a side note, the value for the BITNAMI_USER_PASSWORD placeholder is included in the application credentials or, if the credentials were defined by the user, it is the same as the application password. mysql -u root -p mysql> create database DATABASE_NAME; mysql> grant all privileges on DATABASE_NAME.* to 'bitnami'@'localhost' identified by 'BITNAMI_USER_PASSWORD'; mysql> flush privileges; mysql> exit; mysql -u root -p DATABASE_NAME < backup.sql Note that the steps previously described will only back up the data contained inside your database. There may be other files that you should take into account when performing a full backup, such as files that may have been uploaded to the application. These files are stored in the application folder itself, so copy this folder to have a backup of your uploaded files. How to secure your server from remote connections? Once you have created a new database and user for your application, connect to your MariaDB server and follow these recommendations: Remove anonymous users: mysql> DELETE FROM mysql.user WHERE User=''; Remove the test database and access to it:

mysql> DROP DATABASE test; mysql> DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'; Disallow root login remotely: mysql> DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); Don't forget to reload the privileges tables to apply the changes: mysql> FLUSH PRIVILEGES; Change your root user password. It is strongly recommended that you do not have empty passwords for any user accounts when using the server for any production work. If you don't need remote access, uncomment the line #bind-address=127.0.0.1 in the MariaDB configuration file to only listen for connections on the local machine. Restart the server once done. How to debug errors in your database? Please note that depending on the version you have installed, you may find the MariaDB files at /opt/bitnami/mysql The main log file is created at /opt/bitnami/mariadb/data/mysqld.log on the MySQL database server host. How to recover a MariaDB database with errors? Before trying to recover a MariaDB database, you should check the exact error in the MariaDB log file at /opt/bitnami/mariadb/data/mysqld.log. Check the latest entries in the MariaDB log file with the following command:

sudo tail -n 100 /opt/bitnami/mariadb/data/mysqld.log In this case, assume the following error in the log file: 110108 10:37:45 [ERROR] Fatal error: Can't open and lock privilege table s: Table 'user' is marked as crashed Here are some steps to resolve this error: The MariaDB database is configured to use InnoDB engine by default. You can add the innodb_force_recovery=1 option in the main MariaDB configuration file at /opt/bitnami/mariadb/my.cnf to try and fix the database: [mysqld] innodb_force_recovery = 1 Start the MariaDB database with the following command: mysqld --skip-grant-tables --user=mysql --pid-file=/opt/bitnami/m ariadb/data/mysqld.pid --skip-external-locking --port=3306 --sock=/opt/bitnami/mariadb/ tmp/mysql.sock Open a new console and try to log in the database: mysql -u root -p In this case, the error was related to the mysql.user table. Run these commands: mysql> use mysql; mysql> repair table user; mysql> check table user; mysql> exit;

If the table is recovered, you should see "OK" in the mysql.user status table. Do not forget to remove the innodb_force_recovery option from the my.cnf file and restart the MariaDB server again. sudo /opt/bitnami/ctlscript.sh restart mariadb If you find a different error or cannot fix an issue, we can try to help at http://community.bitnami.com. How to change the data directory? The data directory for MariaDB is set to /opt/bitnami/mariadb/data by default. You can modify the location of this folder modifying the /opt/bitnami/mariadb/my.cnf file, as shown below:... datadir=/opt/bitnami/mariadb/data... Also modify the /opt/bitnami/mariadb/scripts/ctl.sh file to reflect the new directory location: --datadir=/opt/bitnami/mariadb/data Finally, move the data/ directory to the new location and restart the database.