Skip to content

Commit

Permalink
Merge pull request #32 from skysqlinc/fix-links-4
Browse files Browse the repository at this point in the history
More link and format cleaups.
  • Loading branch information
nachiketb authored Jul 19, 2024
2 parents e91dc9c + 5581ea0 commit fd9c15d
Show file tree
Hide file tree
Showing 16 changed files with 167 additions and 188 deletions.
6 changes: 3 additions & 3 deletions docs/Autonomously scale Compute, Storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Auto-scale of nodes enables scaling based on load:

Auto-scale of storage enables expansion of capacity based on usage.

Autonomous features can be enabled at time of [service launch](<../Portal features/Launch page/>).
Autonomous features can be enabled at time of [service launch](<../Portal features/Launch page.md>).
Autonomous features can be enabled or disabled after launch.

![autonomous.png](autonomous.png)
Expand All @@ -18,7 +18,7 @@ Autonomous features can be enabled or disabled after launch.

Auto-scaling of nodes can be enabled either at time of service launch or after service launch.

During [service launch](<../Portal features/Launch page/>):
During [service launch](<../Portal features/Launch page.md>):

- Check the "Enable auto-scale nodes" checkbox and set the desired scaling parameters.

Expand All @@ -28,7 +28,7 @@ After service launch, [manage Autonomous settings](#manage-autonomous-settings)

Auto-scaling of storage can be enabled either at time of service launch or after service launch.

During [Service Launch](<../Portal features/Launch page/>):
During [Service Launch](<../Portal features/Launch page.md>):

- Check the "Enable auto-scale storage" checkbox and set the desired maximum transactional data storage.

Expand Down
1 change: 0 additions & 1 deletion docs/Backup and Restore/List Restore Examples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
details>
<summary>
Authentication
</summary>
Expand Down
15 changes: 4 additions & 11 deletions docs/Data loading, Migration/Import data from external DB.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To export data from a MySQL/MariaDB database and import it into SkySQL, you can

1. Start by using the `mysqldump` command to export the data from the source database. This command allows you to create a backup of your database in a SQL file. For example, you can use the following command:

```
```bash
mysqldump -u [username] -p [database_name] > dump.sql

```
Expand All @@ -33,7 +33,8 @@ To export data from a MySQL/MariaDB database and import it into SkySQL, you can
```bash
## mariadb -u [username] -p [database_name] < dump.sql
mariadb --host dbpwp27784332.orgtd5j0.db1.skysql.mariadb.com --port 3306 --user dbpwp27784332 -p [database_name] < dump.sql
mariadb --host dbpwp27784332.orgtd5j0.db1.skysql.mariadb.com --port 3306 \
--user dbpwp27784332 -p [database_name] < dump.sql
```

Replace `[hostname], username]` with your SkySQL username and `[database_name]` with the name of the destination database. The `<` symbol is used to redirect the input from the file `dump.sql`.
Expand All @@ -43,18 +44,10 @@ By following these steps, you will be able to export data from your MySQL/MariaD

<aside>
💡 Note that mariadb-dump uses a single thread to create a logical backup (SQL) of your database. While this approach can work well on a loaded production DB there are better/faster approaches to dumping and loading data in parallel. You can use the mysqlpump or the mariadb-backup (or mysqlbackup) command to parallelize the export of larger DBs.

</aside>

<aside>
💡 TODO - describe how users can use the SkySQL backup service to do a fast backup and restore of a compatible external database.

</aside>

### Mariadb-dump options

- [mariadb-dump Options for 23.08 ES](https://mariadb.com/docs/skysql-dbaas/ref/es23.08/cli/mariadb-dump/)
- [mariadb-dump Options for 23.07 ES](https://mariadb.com/docs/skysql-dbaas/ref/es23.07/cli/mariadb-dump/)
- [mariadb-dump Options for 10.6 ES](https://mariadb.com/docs/skysql-dbaas/ref/es10.6/cli/mariadb-dump/)
- [mariadb-dump Options for 10.5 ES](https://mariadb.com/docs/skysql-dbaas/ref/es10.5/cli/mariadb-dump/)
- [mariadb-dump Options for 10.4 ES](https://mariadb.com/docs/skysql-dbaas/ref/es10.4/cli/mysqldump/)
See [Mariadb-dump options](https://mariadb.com/kb/en/mariadb-dump/)
38 changes: 19 additions & 19 deletions docs/Data loading, Migration/Import-CSV-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SkySQL customers can import data into a SkySQL service using the `LOAD DATA L
- The `LOAD DATA LOCAL INFILE` statement can be executed by any client or connector

!!! Note
Make sure your schema is already created in the database. If you need to import entire databases or create tables, you should use mariab-import.
Make sure your schema is already created in the database. If you need to import entire databases or create tables, you should use [mariab-import](<./Install-mariadb-import.md>).


## **Enable Local Infiles**
Expand All @@ -15,24 +15,24 @@ Support for local infiles must be enabled on the client side and on the SkySQL s

### **Enable Local Infiles on the Client or Connector**

To execute the [`LOAD DATA LOCAL INFILE`](https://mariadb.com/docs/skysql-dbaas/ref/mdb/sql-statements/LOAD_DATA_INFILE/) statement, most clients and connectors require a specific option to be enabled.
To execute the [`LOAD DATA LOCAL INFILE`](https://mariadb.com/kb/en/load-data-infile/) statement, most clients and connectors require a specific option to be enabled.

If you are using `mariadb` client, the [`--local-infile` option](https://mariadb.com/docs/skysql-dbaas/ref/mdb/cli/mariadb/local-infile/) must be specified.
If you are using `mariadb` client, the [`--local-infile` option](https://mariadb.com/docs/server/data-operations/data-import/enterprise-server/load-data-local-infile/) must be specified.

### **Enable Local Infiles in SkySQL**

Support for local infiles must be enabled on the SkySQL service.

For SkySQL services that use MariaDB Enterprise Server and MariaDB Enterprise ColumnStore, the [local_infile system variable](https://mariadb.com/docs/skysql-dbaas/ref/mdb/system-variables/local_infile/) must be enabled:
For SkySQL services that use MariaDB Enterprise Server, the [local_infile system variable](https://mariadb.com/kb/en/server-system-variables/#local_infile) must be enabled:

- For Replicated Transactions and Single Node Transactions services, the [local_infile system variable](https://mariadb.com/docs/skysql-dbaas/ref/mdb/system-variables/local_infile/) is `OFF` by default
- For Replicated Transactions and Single Node Transactions services, the `local_infile` system variable is `OFF` by default

[Configuration Manager](https://mariadb.com/docs/skysql-dbaas/service-management/nr-configuration-management/) can be used to modify the value of the [local_infile system variable](https://mariadb.com/docs/skysql-dbaas/ref/mdb/system-variables/local_infile/).
[Configuration Manager](<../../config/>) can be used to modify the value of the `local_infile` system variable.

## **Import Data**

1. Determine the [connection parameters](https://mariadb.com/docs/skysql-dbaas/connect/nr-client-connections/) for your SkySQL service.
2. Connect with the `mariadb` client and specify the [-local-infile option](https://mariadb.com/docs/skysql-dbaas/ref/mdb/cli/mariadb/local-infile/), which is needed by the next step:
1. Determine the [connection parameters](<../../Connecting to Sky DBs/>) for your SkySQL service.
2. Connect with the `mariadb` client and specify the [-local-infile option](https://mariadb.com/docs/server/data-operations/data-import/enterprise-server/load-data-local-infile/), which is needed by the next step:

```bash
mariadb --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \
Expand All @@ -44,18 +44,18 @@ mariadb --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \

After the command is executed, you will be prompted for a password. Enter the default password for your default user, the password you set for the default user, or the password for the database user you created.

For each table that you want to import, execute the [LOAD DATA LOCAL INFILE](https://mariadb.com/docs/skysql-dbaas/ref/mdb/sql-statements/LOAD_DATA_INFILE/) statement to import the data from the TSV or CSV file into your SkySQL database service.
For each table that you want to import, execute the [LOAD DATA LOCAL INFILE](https://mariadb.com/kb/en/load-data-infile/) statement to import the data from the TSV or CSV file into your SkySQL database service.

For a TSV file:

```bash
```SQL
LOAD DATA LOCAL INFILE 'contacts.tsv'
INTO TABLE accounts.contacts;
```

For a CSV file:

```bash
```sql
LOAD DATA LOCAL INFILE 'contacts.csv'
INTO TABLE accounts.contacts
FIELDS TERMINATED BY ',';
Expand All @@ -65,23 +65,23 @@ FIELDS TERMINATED BY ',';

If you are using a MariaDB Connector, then you must select the method for the specific connector from the list below.

If you are using MariaDB Connector/C, the `MYSQL_OPT_LOCAL_INFILE` option can be set with the `mysql_optionsv()` function:
If you are using `MariaDB Connector/C`, the `MYSQL_OPT_LOCAL_INFILE` option can be set with the `mysql_optionsv()` function:

```bash
```c
/* enable local infile */
unsigned int enable_local_infile = 1;
mysql_optionsv(mysql, MYSQL_OPT_LOCAL_INFILE, (void *) &enable_local_infile);
```
If you are using MariaDB Connector/J, the `allowLocalInfile` parameter can be set for the connection:
If you are using `MariaDB Connector/J`, the `allowLocalInfile` parameter can be set for the connection:
```bash
```java
Connection connection = DriverManager.getConnection("jdbc:mariadb://FULLY_QUALIFIED_DOMAIN_NAME:TCP_PORT/test?user=DATABASE_USER&password=DATABASE_PASSWORD&allowLocalInfile=true");
```

If you are using MariaDB Connector/Node.js, the `permitLocalInfile` parameter can be set for the connection:
If you are using `MariaDB Connector/Node.js`, the `permitLocalInfile` parameter can be set for the connection:

```bash
```js
mariadb.createConnection({
host: 'FULLY_QUALIFIED_DOMAIN_NAME',
port: 'TCP_PORT',
Expand All @@ -91,9 +91,9 @@ mariadb.createConnection({
});
```

If you are using MariaDB Connector/Python, the `local_infile` parameter can be set for the connection:
If you are using `MariaDB Connector/Python`, the `local_infile` parameter can be set for the connection:

```bash
```python
conn = mariadb.connect(
user="DATABASE_USER",
password="DATABASE_PASSWORD",
Expand Down
83 changes: 41 additions & 42 deletions docs/Data loading, Migration/Install Mariadb-dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ SkySQL customers can manually create a backup of a SkySQL service using the `ma

- The `mariadb-dump` utility provides a command-line interface (CLI)
- The `mariadb-dump` utility is available for Linux and Windows
- The `mariadb-dump` utility supports [many command-line options](https://mariadb.com/docs/skysql-dbaas/ref/mdb/cli/mariadb-dump/)
- The `mariadb-dump` utility supports [many command-line options](https://mariadb.com/kb/en/mariadb-dump/)
- Egress charges may apply for customer-initiated backups

For details about restoring a backup created with the `mariadb-dump` utility, see "[Restore a Manual Backup](https://mariadb.com/docs/skysql-dbaas/data-operations/backup-restore/nr-manual-restore/)".
For details about restoring a backup created with the `mariadb-dump` utility, see "[Restore a Manual Backup](https://mariadb.com/kb/en/mariadb-dump/#restoring)".

# Installation

Expand All @@ -17,58 +17,59 @@ Installation of MariaDB Dump varies by operating system.

1. Configure YUM package repositories:

`$ sudo yum install wget

$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup

$ echo "935944a2ab2b2a48a47f68711b43ad2d698c97f1c3a7d074b34058060c2ad21b mariadb_repo_setup" \ **|** sha256sum -c -

$ chmod +x mariadb_repo_setup

$ sudo ./mariadb_repo_setup \ --mariadb-server-version="mariadb-10.6"`
```bash
sudo yum install wget
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
echo "935944a2ab2b2a48a47f68711b43ad2d698c97f1c3a7d074b34058060c2ad21b mariadb_repo_setup" \
| sha256sum -c -
chmod +x mariadb_repo_setup
sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6"
```

2. Install MariaDB Dump and package dependencies:

`$ sudo yum install MariaDB-client`

```bash
sudo yum install MariaDB-client
```

### **Debian / Ubuntu**

1. Configure APT package repositories:

`$ sudo apt install wget

$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup

$ echo "935944a2ab2b2a48a47f68711b43ad2d698c97f1c3a7d074b34058060c2ad21b mariadb_repo_setup" \ **|** sha256sum -c -

$ chmod +x mariadb_repo_setup

$ sudo ./mariadb_repo_setup \ --mariadb-server-version="mariadb-10.6"$ sudo apt update`
```bash
sudo apt install wget
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
$ echo "935944a2ab2b2a48a47f68711b43ad2d698c97f1c3a7d074b34058060c2ad21b mariadb_repo_setup"
| sha256sum -c -
chmod +x mariadb_repo_setup
sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6"$ sudo apt update
```

2. Install MariaDB Dump and package dependencies:

`$ sudo apt install mariadb-client`
```bash
sudo apt install mariadb-client
```


### **SLES**

1. Configure ZYpp package repositories:

`$ sudo zypper install wget

$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup

$ echo "935944a2ab2b2a48a47f68711b43ad2d698c97f1c3a7d074b34058060c2ad21b mariadb_repo_setup" \ **|** sha256sum -c -

$ chmod +x mariadb_repo_setup

$ sudo ./mariadb_repo_setup \ --mariadb-server-version="mariadb-10.6"`
```bash
sudo zypper install wget
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
echo "935944a2ab2b2a48a47f68711b43ad2d698c97f1c3a7d074b34058060c2ad21b mariadb_repo_setup" \
| sha256sum -c -
chmod +x mariadb_repo_setup
sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6"
```

2. Install MariaDB Dump and package dependencies:

`$ sudo zypper install MariaDB-client`

```bash
sudo zypper install MariaDB-client
```

### **Windows**

Expand All @@ -92,18 +93,17 @@ Installation of MariaDB Dump varies by operating system.
The procedure to create a backup depends on the operating system.
If you plan to restore the backup to a SkySQL service, the `mysql` database should be excluded from the backup by specifying `[--ignore-database=mysql](https://mariadb.com/docs/skysql-dbaas/ref/mdb/cli/mariadb-dump/ignore-database/)`, because SkySQL user accounts do not have sufficient privileges to restore that database.
If you plan to restore the backup to a SkySQL service, the `mysql` database should be excluded from the backup by specifying [`--ignore-database=mysql`](https://mariadb.com/kb/en/mariadb-dump/#options), because SkySQL user accounts do not have sufficient privileges to restore that database.
### **Linux**
1. Determine the [connection parameters](https://mariadb.com/docs/skysql-dbaas/connect/nr-client-connections/) for your SkySQL service.
1. Determine the [connection parameters](<../../Connecting to Sky DBs/>) for your SkySQL service.
2. Use your connection parameters in the following command line:
```bash
mariadb-dump --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \
--user DATABASE_USER --password \
--ssl-verify-server-cert \
--ssl-ca ~/PATH_TO_PEM_FILE \
--all-databases \
--ignore-database=mysql \
--single-transaction \
Expand All @@ -116,7 +116,6 @@ mariadb-dump --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \
- Replace `FULLY_QUALIFIED_DOMAIN_NAME` with the Fully Qualified Domain Name of your service.
- Replace `TCP_PORT` with the read-write or read-only port of your service.
- Replace `DATABASE_USER` with the default username for your service, or the username you created.
- Replace `~/PATH_TO_PEM_FILE` with the path to the certificate authority chain (.pem) file.
After the command is executed, you will be prompted for a password. Enter the default password for your default user, the password you set for the default user, or the password for the database user you created.
Expand All @@ -126,16 +125,17 @@ After the command is executed, you will be prompted for a password. Enter the de
On Windows, MariaDB Dump is not typically found in the executable search path by default. You must find its installation path, and add that path to the executable search path:
`$ SET "PATH=C:\Program Files\MariaDB 10.6\bin;%PATH%"`
```bash
SET "PATH=C:\Program Files\MariaDB 10.6\bin;%PATH%"
```
2. Determine the [connection parameters](https://mariadb.com/docs/skysql-dbaas/connect/nr-client-connections/) for your SkySQL service.
2. Determine the [connection parameters](<../../Connecting to Sky DBs/>) for your SkySQL service.
3. Use your connection parameters in the following command line:
```bash
mariadb-dump --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \
--user DATABASE_USER --password \
--ssl-verify-server-cert \
--ssl-ca ~/PATH_TO_PEM_FILE \
--all-databases \
--ignore-database=mysql \
--single-transaction \
Expand All @@ -148,7 +148,6 @@ mariadb-dump --host FULLY_QUALIFIED_DOMAIN_NAME --port TCP_PORT \
- Replace `FULLY_QUALIFIED_DOMAIN_NAME` with the Fully Qualified Domain Name of your service.
- Replace `TCP_PORT` with the read-write or read-only port of your service.
- Replace `DATABASE_USER` with the default username for your service, or the username you created.
- Replace `PATH_TO_PEM_FILE` with the path to the certificate authority chain (.pem) file.
After the command is executed, you will be prompted for a password. Enter the default password for your default user, the password you set for the default user, or the password for the database user you created.
Expand Down
2 changes: 1 addition & 1 deletion docs/Data loading, Migration/Install-mariadb-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The procedure to import data depends on the operating system.
### **Linux**
1. Determine the [connection parameters](https://mariadb.com/docs/skysql-dbaas/connect/nr-client-connections/) for your SkySQL service.
1. Determine the [connection parameters](<../../Connecting to Sky DBs/>) for your SkySQL service.
2. Use MariaDB Import with the connection information to import the data from the TSV or CSV file into your SkySQL database service:
Expand Down
Loading

0 comments on commit fd9c15d

Please sign in to comment.