diff --git a/docs/Autonomously scale Compute, Storage/README.md b/docs/Autonomously scale Compute, Storage/README.md index 05254f93..0049c024 100644 --- a/docs/Autonomously scale Compute, Storage/README.md +++ b/docs/Autonomously scale Compute, Storage/README.md @@ -12,7 +12,7 @@ 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 or disabled after launch. -![https://mariadb.com/docs/_images/screenshots/services-tx-xpand-autonomous-dialog.png](https://mariadb.com/docs/_images/screenshots/services-tx-xpand-autonomous-dialog.png) +![autonomous.png](autonomous.png) ## Enable Auto-Scaling of Nodes diff --git a/docs/Autonomously scale Compute, Storage/Uptime SLA.md b/docs/Autonomously scale Compute, Storage/Uptime SLA.md index 264e15a7..f36281c8 100644 --- a/docs/Autonomously scale Compute, Storage/Uptime SLA.md +++ b/docs/Autonomously scale Compute, Storage/Uptime SLA.md @@ -1,6 +1,6 @@ # Uptime SLA -MariaDB SkySQL customers should assess the availability requirements of their application and choose an appropriate service tier to meet their objectives. MariaDB SkySQL customers are on the Foundation Tier unless they have specifically purchased and paid for Power Tier service. +SkySQL customers should assess the availability requirements of their application and choose an appropriate service tier to meet their objectives. SkySQL customers are on the Foundation Tier unless they have specifically purchased and paid for Power Tier service. ## **Performance Standard** @@ -57,7 +57,7 @@ A customer will forfeit their right to receive a [Service Credit](https://maria - **Underlying infrastructure** - Impact to service availability caused by availability or performance of cloud services used to operate MariaDB SkySQL is excluded. This includes any such outages in Amazon Web Services (AWS) and Amazon Elastic Kubernetes Service (EKS), and Google Cloud Platform (GCP) and Google Kubernetes Engine (GKE). + Impact to service availability caused by availability or performance of cloud services used to operate SkySQL is excluded. This includes any such outages in Amazon Web Services (AWS) and Amazon Elastic Kubernetes Service (EKS), and Google Cloud Platform (GCP) and Google Kubernetes Engine (GKE). - **Network interruption** @@ -65,7 +65,7 @@ A customer will forfeit their right to receive a [Service Credit](https://maria - **External factors** - Impact to your use of service based on factors outside MariaDB SkySQL are excluded. This includes periods of downtime for your applications. + Impact to your use of service based on factors outside SkySQL are excluded. This includes periods of downtime for your applications. - **Uncorroborated impacts** @@ -73,7 +73,7 @@ A customer will forfeit their right to receive a [Service Credit](https://maria - **Portal access** - Impact to your ability to access or use the MariaDB SkySQL portal, an interface provided to manage services, is excluded. This includes any component and content linked from the MariaDB SkySQL portal, including Documentation, the Customer Support portal, Monitoring, and Workload Analysis. These components operate independently from database services and do not impact database availability. + Impact to your ability to access or use the SkySQL portal, an interface provided to manage services, is excluded. This includes any component and content linked from the SkySQL portal, including Documentation, the Customer Support portal, Monitoring, and Workload Analysis. These components operate independently from database services and do not impact database availability. - **Resource usage** @@ -85,7 +85,7 @@ A customer will forfeit their right to receive a [Service Credit](https://maria - **Non-paying customers** - The [Performance Standard](https://mariadb.com/docs/skysql-dbaas/service-management/nr-sla/#Performance_Standard) applies only to paying MariaDB SkySQL customers who are paid-in-full. All other MariaDB SkySQL customers, including those not paid-in-full and those customers participating in a free or credited service trial, are excluded. + The [Performance Standard](https://mariadb.com/docs/skysql-dbaas/service-management/nr-sla/#Performance_Standard) applies only to paying SkySQL customers who are paid-in-full. All other SkySQL customers, including those not paid-in-full and those customers participating in a free or credited service trial, are excluded. - **Customer-directed maintenance** diff --git a/docs/Autonomously scale Compute, Storage/autonomous.png b/docs/Autonomously scale Compute, Storage/autonomous.png new file mode 100644 index 00000000..1119acc3 Binary files /dev/null and b/docs/Autonomously scale Compute, Storage/autonomous.png differ diff --git a/docs/Backup and Restore/README.md b/docs/Backup and Restore/README.md index 98f6b4c5..e142d3c5 100644 --- a/docs/Backup and Restore/README.md +++ b/docs/Backup and Restore/README.md @@ -157,7 +157,7 @@ Binlogs record database changes (data modifications, table structure changes) in #### BinaryLog Backup Examples -- [Examples](BinaryLog Backup Examples.md) +- [Examples](<./Binarylog Backup Examples.md>) ### **Additional Backup Options (with Examples)** diff --git a/docs/Billing and Power Tier/Billing.md b/docs/Billing and Power Tier/Billing.md index 25026775..888614dd 100644 --- a/docs/Billing and Power Tier/Billing.md +++ b/docs/Billing and Power Tier/Billing.md @@ -1,14 +1,14 @@ # Billing -Billing is associated with a [MariaDB ID](https://mariadb.com/docs/skysql-dbaas/working/nr-mariadb-id/). +Billing is associated with a SkySQL ID. -For pricing information see "[Pricing](https://mariadb.com/docs/skysql-previous-release/features-and-concepts/pricing/)" . +For pricing information see "[Pricing](<./Pricing.md>)" . ## **Usage Information** -From the [Portal](https://mariadb.com/docs/skysql-dbaas/working/nr-portal/), you can access a current billing and usage summary: +From the [Portal](https://app.skysql.com/dashboard), you can access a current billing and usage summary: -1. Log in to the [Portal](https://mariadb.com/docs/skysql-dbaas/working/nr-portal/). +1. Log in to the [Portal](https://app.skysql.com/dashboard). 2. Click your name in the upper-right corner of the interface, then select "Billing" from the menu. 3. The "Current Usage" tab (the default) shows current billing and usage summary. @@ -18,24 +18,14 @@ Usage information can be shown by service or by resource. Click the resource name or service name to expand the view. -![https://mariadb.com/docs/_images/screenshots/services-tx-xpand-billing-usage.png](https://mariadb.com/docs/_images/screenshots/services-tx-xpand-billing-usage.png) +![current-usage.png](current-usage.png) -*Billing - Usage* - -https://skysql.mariadb.com/billings/usage +*Billing - Current Usage* ## **Billing History & Invoices** -From the [Portal](https://mariadb.com/docs/skysql-dbaas/working/nr-portal/), you can access prior invoices: +From the [Portal](https://app.skysql.com/dashboard), you can access prior invoices: -1. Log in to the [Portal](https://mariadb.com/docs/skysql-dbaas/working/nr-portal/). +1. Log in to the [Portal](https://app.skysql.com/dashboard). 2. Click your name in the upper-right corner of the interface, then select "Billing" from the menu. 3. Click the "Billing History" tab to show available invoices. -- Remittance customers should contact their billing administrator for billing questions. - -![https://mariadb.com/docs/_images/screenshots/services-tx-xpand-billing-history.png](https://mariadb.com/docs/_images/screenshots/services-tx-xpand-billing-history.png) - -*Billing - Billing History* - -https://skysql.mariadb.com/billings/history - diff --git a/docs/Billing and Power Tier/Maintenance Windows.md b/docs/Billing and Power Tier/Maintenance Windows.md new file mode 100644 index 00000000..8aa5301c --- /dev/null +++ b/docs/Billing and Power Tier/Maintenance Windows.md @@ -0,0 +1,43 @@ +# Maintenance Windows + +Maintenance windows are a scheduled period of time when hardware, network, software, or configuration changes can be applied, and processes can be restarted. + +For Foundation Tier customers, maintenance windows are predefined by region. + +For Power Tier customers, maintenance windows are customer-selected. + +Notice is provided to customers in advance of maintenance. SkyDBA customers are asked to confirm maintenance prior to scheduled start. + +## View Current Maintenance Window + +For Foundation Tier, to view the maintenance widown, Go to "Your services" and then "Details". + +On Power Tier, to show the current maintenance window for a service: + +1. Go to "Your services" page (top choice in left navigation). + +2. Click the ">" to the left of the desired service. + +3. The current maintenance window is shown in the "Customization" section. + +## Choose Maintenance Window + +A maintenance window selection applies to all services within a region. + +For Power Tier customers, maintenance windows are customer-selected: + +- A menu of supported maintenance windows is presented at time of service launch. + +- Maintenance windows may be changed after service launch, once a service reaches "Healthy" state. + +Maintenance windows can be updated at time of service launch, or on-demand: + +1. Go to "Your services" page (top choice in left navigation). + +2. Click the ">" to the left of the desired service. + +3. The current maintenance window is shown in the "Customization" section. + +4. Click on the triangle at the right of the "Maintenance window" to see a drop down display of available maintenance windows. + +5. Select the desired maintenance window and click on the "Save" button. This change will be applied to all services in the region. \ No newline at end of file diff --git a/docs/Billing and Power Tier/Maxscale Redundancy.md b/docs/Billing and Power Tier/Maxscale Redundancy.md new file mode 100644 index 00000000..780a040f --- /dev/null +++ b/docs/Billing and Power Tier/Maxscale Redundancy.md @@ -0,0 +1,25 @@ +# MaxScale Redundancy + +MariaDB MaxScale serves as the load balancer in certain SkySQL topologies. + +SkySQL supports MaxScale Redundancy as an option at time of launch: + +- This feature is not enabled by default. By default, topologies that use MaxScale contain only one MaxScale node. + +- When MaxScale Redundancy is selected, MaxScale nodes are deployed in a highly available (HA) active-active configuration behind round robin load balancing. + +- When MaxScale Redundancy is enabled, MaxScale instance size can be selected. + +- MaxScale Redundancy is available to Power Tier customers. + +## Compatibility + +- Replicated Transactions + +## Enable MaxScale Redundancy + +1. Launch a SkySQL service: + +- Check the "Enable MaxScale Redundancy" checkbox. + +- Choose the [MaxScale instance size](<../Reference Guide/Instance Size Choices.md>) diff --git a/docs/Billing and Power Tier/Pricing.md b/docs/Billing and Power Tier/Pricing.md new file mode 100644 index 00000000..fbefd3f9 --- /dev/null +++ b/docs/Billing and Power Tier/Pricing.md @@ -0,0 +1,35 @@ +# Pricing + +SkySQL pricing information is shown at time of service launch. + +Pricing shown within the SkySQL interface is an estimate of the cost of using SkySQL services based on your specified usage parameters. Pricing information is shown at time of service launch and subsequently as estimated charges. + +The cost shown is not a quote and does not guarantee the cost for your actual use of SkySQL services. + +## Estimated Pricing + +The cost estimate may vary from your actual costs for several reasons, including: + +- **Actual usage**: Your actual cost will be based on your actual use of the services, not the estimate. + +- **Region**: The prices for SkySQL services may vary between regions. Using a different region than the one selected may affect the results. + +- **Price changes**: On-demand pricing for most services may change over time. If you buy services on-demand, your bill may be less or more than estimated based on the current on-demand rates. + +- **Taxes**: The estimate does not include any taxes that may be applied to your purchase of the services. + +- **Time frame assumptions**: On-demand monthly pricing assumes that your instance or node runs for a 730 hour month. The estimate does not account for leap years, which add one additional day (24 hours). + +- **Promotional credits and discounts**: The estimate does not account for promotional credits or other discounts. + +- **Monthly billing period**: MariaDB bills on a monthly basis. If your utilization starts mid-month, you will only see a portion of an actual month's full costs on your invoice. + +- **Rounding**: Estimated fees include mathematical rounding of pricing data. + +- **Scale fabric**: Scale fabric costs represent the additional network, host, and backup infrastructure needed to support multi-node topologies. In addition to multi-node topologies, this cost also applies to the Distributed Transactions topology when deployed with 1 Xpand node, since infrastructure is present to support scale-up to a multi-node configuration. + +- **Previous services**: The estimate is only for the service being launched and does not account for other current or previous charges to the SkySQL account. + +- **Cross-Region Replicas**: The estimate does not include cross-region replicas. + +- **Currency**: Estimates are provided in either US dollars or Euros depending on your account address country. Your actual cost will be based on US dollar pricing with a conversion to Euros depending on your account address country. \ No newline at end of file diff --git a/docs/Billing and Power Tier/README.md b/docs/Billing and Power Tier/README.md index 174f2a24..50a4f091 100644 --- a/docs/Billing and Power Tier/README.md +++ b/docs/Billing and Power Tier/README.md @@ -9,20 +9,17 @@ Power Tier is a premium service offering who have the most critical requirements ## **Upgrade to Power Tier** -By default, any new signed up users are in the “Foundation Tier”. To upgrade to Power Tier, simply click the ‘Upgrade’ button - SkySQL support will contact you and start the upgrade process. You can also directly reach out to [SkySQL Support](https://mariadb.com/docs/skysql-previous-release/service-management/support/). +By default, any new signed up users are in the “Foundation Tier”. To upgrade to Power Tier, simply click the ‘Upgrade’ button - SkySQL support will contact you and start the upgrade process. You can also directly reach out to [SkySQL Support](<../Support.md>). ## **Features** Features available to SkySQL Power Tier customers include: -- [Enhanced Service Level Agreement (SLA)](https://mariadb.com/docs/skysql-previous-release/features-and-concepts/service-availability/) -- [Extended Range of Instance Sizes](https://mariadb.com/docs/skysql-previous-release/features-and-concepts/selections/instance-sizes/) -- [Custom Instance Sizes](https://mariadb.com/docs/skysql-previous-release/service-management/options/custom-instance-sizes/) -- [Choice of Maintenance Window](https://mariadb.com/docs/skysql-previous-release/features-and-concepts/selections/maintenance-window/) -- [MaxScale Redundancy](https://mariadb.com/docs/skysql-previous-release/service-management/options/maxscale-redundancy/) -- [Custom Configuration](https://mariadb.com/docs/skysql-previous-release/service-management/options/custom-configuration/) -- Choice between [Enterprise and Platinum Support Plans](https://mariadb.com/docs/skysql-previous-release/features-and-concepts/support/) -- [AWS PrivateLink](https://mariadb.com/docs/skysql-previous-release/service-management/options/aws-privatelink/) and [GCP VPC Peering](https://mariadb.com/docs/skysql-previous-release/service-management/options/vpc-peering/) available +- [Enhanced Service Level Agreement (SLA)](https://skysql.com/sla/) +- [Extended Range of Instance Sizes](<../Reference Guide/Instance Size Choices.md>) +- [Choice of Maintenance Window](<./Maintenance Windows.md>) +- [MaxScale Redundancy](<./Maxscale Redundancy.md>) +- Choice of [Support Plans](https://skysql.com/support-policy/) - Point-in-time recovery -- See all [Options](https://mariadb.com/docs/skysql-previous-release/service-management/options/) which augment the default SkySQL service experience +- See all [Options](https://skysql.com/support-policy/) which augment the default SkySQL service experience diff --git a/docs/Billing and Power Tier/current-usage.png b/docs/Billing and Power Tier/current-usage.png new file mode 100644 index 00000000..1d7424d1 Binary files /dev/null and b/docs/Billing and Power Tier/current-usage.png differ diff --git a/docs/Connecting to Sky DBs/Connect from Java App.md b/docs/Connecting to Sky DBs/Connect from Java App.md index 9c228a9a..e38bf31e 100644 --- a/docs/Connecting to Sky DBs/Connect from Java App.md +++ b/docs/Connecting to Sky DBs/Connect from Java App.md @@ -2,21 +2,12 @@ MariaDB Connector/J enables Java applications to connect to SkySQL using a native MariaDB connector. -# Download the connector .. - -| Version | Latest Release | Latest Release Date | Maturity | -| --- | --- | --- | --- | -| MariaDB Connector/J 3.1 | https://mariadb.com/docs/server/release-notes/mariadb-connector-j-3-1/3-1-4/ | 2023-05-01 | General Availability | -| MariaDB Connector/J 3.0 | https://mariadb.com/docs/server/release-notes/mariadb-connector-j-3-0/3-0-10/ | 2023-01-11 | General Availability | -| MariaDB Connector/J 2.7 | https://mariadb.com/docs/server/release-notes/mariadb-connector-j-2-7/2-7-9/ | 2023-03-22 | General Availability | -| MariaDB Connector/J 1.8 | MariaDB Connector/J 1.8.0 | 2019-02-11 | GA | - # Install MariaDB Connector/J via JAR To download the JAR file manually: 1. Go to the [MariaDB Connector/J download page](https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector/) -2. Within the "Product" dropdown, choose the "Java 8 connector" or "Java 7 connector". +2. Within the "Product" dropdown, choose the "Java 8+ connector". 3. In the "Version" dropdown, choose the desired version. 4. Click the "Download" button to download the JAR file. 5. When the JAR file finishes downloading, place it into the relevant directory on your system. @@ -32,18 +23,18 @@ To use Maven to install MariaDB Connector/J, add the dependency to your `pom.xm org.mariadb.jdbc mariadb-java-client - 3.0.10 + 3.4.1 ``` -For additional information on available releases, see the "[Release Notes for MariaDB Connector/J](https://mariadb.com/docs/server/release-notes/mariadb-connector-j-3-1/)". +For additional information on available releases, see the "[Release Notes for MariaDB Connector/J](https://mariadb.com/kb/en/mariadb-connector-j-release-notes/)". Depending on the features you plan to use, you may need to add some additional dependencies to `pom.xml`. If you downloaded the connector JAR, place it on your CLASSPATH ```bash -export CLASSPATH="/path/to/application:/path/to/mariadb-java-client-3.0.10.jar" +export CLASSPATH="/path/to/application:/path/to/mariadb-java-client-3.4.1.jar" ``` ### **Connector/J 3.0** @@ -111,12 +102,3 @@ public class App { } } ``` - -| Connector | MariaDB Connector/J | -| --- | --- | -| Supported Versions | https://mariadb.com/docs/server/release-notes/mariadb-connector-j-3-1/https://mariadb.com/docs/server/release-notes/mariadb-connector-j-3-0/https://mariadb.com/docs/server/release-notes/mariadb-connector-j-2-7/MariaDB Connector/J 1.8 | -| Programming Language | Java | -| Programming Language Version | Java 17, Java 11, Java 8 (Connector/J 3.1)Java 17, Java 11, Java 8 (Connector/J 3.0)Java 17, Java 11, Java 8 (Connector/J 2.7)Java 7 (Connector/J 1.8) | -| API | JDBC 4.2 (Connector/J 3.1)JDBC 4.2 (Connector/J 3.0)JDBC 4.2 (Connector/J 2.7)JDBC 4.1 (Connector/J 1.8) | -| Supports TLS | Yes | -| License | GNU Lesser General Public License v2.1 | diff --git a/docs/Connecting to Sky DBs/Connect from MongoDB clients.md b/docs/Connecting to Sky DBs/Connect from MongoDB clients.md index 553038ba..c1df4dd4 100644 --- a/docs/Connecting to Sky DBs/Connect from MongoDB clients.md +++ b/docs/Connecting to Sky DBs/Connect from MongoDB clients.md @@ -11,7 +11,7 @@ For detailed information on supported commands, see "[NoSQL Protocol Module](htt # Enable Support for NoSQL -1. When [launching](https://mariadb.com/docs/skysql-dbaas/service-management/nr-launch/) Enterprise Server With Replica(s), after defining the service name, expand the "Additional options" section. +1. When [launching](<../Portal features/Launch page.md>) Enterprise Server With Replica(s), after defining the service name, expand the "Additional options" section. 2. Check the "Enable support for NoSQL" checkbox. # Available Clients @@ -26,6 +26,6 @@ From the Dashboard, the details needed to connect to your SkySQL service can be The "NoSQL port" is the TCP port used to connect to the NoSQL interface. -The [firewall](https://mariadb.com/docs/skysql-dbaas/security/nr-firewall/) must be configured to allowlist the client's IP address or netblock before connections can occur. +The [firewall](<../Security/Configuring Firewall.md>) must be configured to allowlist the client's IP address or netblock before connections can occur. See the "Connecting using Mongosh" section of the Connect page for an example `mongosh` command-line, authentication instructions, and instructions to change the default password. \ No newline at end of file diff --git a/docs/Connecting to Sky DBs/Connect from Node js App.md b/docs/Connecting to Sky DBs/Connect from Node js App.md index a94c2287..f6a50c73 100644 --- a/docs/Connecting to Sky DBs/Connect from Node js App.md +++ b/docs/Connecting to Sky DBs/Connect from Node js App.md @@ -10,7 +10,9 @@ MariaDB Connector/Node.js is usually installed either from the Node.js repositor To install MariaDB Connector/Node.js from the Node.js repository, use NPM: -`$ npm install mariadb` +```bash +npm install mariadb +``` NPM connects to the Node.js repository and downloads MariaDB Connector/Node.js and all relevant dependencies into the `node_modules/` directory. @@ -19,7 +21,7 @@ NPM connects to the Node.js repository and downloads MariaDB Connector/Node.js a To download and install the MariaDB Connector/Node.js manually from source code: 1. Go to the MariaDB Connectors download page: - - [https://mariadb.com/downloads/#connectors](https://mariadb.com/downloads/#connectors) + - [https://mariadb.com/downloads/connectors/connectors-data-access/nodejs-connector](https://mariadb.com/downloads/connectors/connectors-data-access/nodejs-connector) 2. In the "Product" dropdown, select the Node.js connector. 3. Click the "Download" button to download the source code package 4. When the source code package finishes downloading, install it with NPM: @@ -37,24 +39,29 @@ Node.js developers can use MariaDB Connector/Node.js to establish client connect # Require Callback API -MariaDB Connector/Node.js provides two different connection implementations: one built on the [Promise API](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/nodejs/promise/) and the other built on the Callback API. +MariaDB Connector/Node.js provides two different connection implementations: one built on the [Promise API](https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/promise-api.md) and the other built on the Callback API. To use the Callback API, use the following module: -**`const** mariadb = require**(**'mariadb/callback'**);**` +```js +const** mariadb = require**(**'mariadb/callback'**); +``` # Connect -`createConnection(options) -> Connection` is the base function used to create a `Connection` object. +```js +createConnection(options) -> Connection +``` +is the base function used to create a `Connection` object. The `createConnection(options)` function returns a `Connection` object. -Determine the [connection information](https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/) for your SkySQL database service: +Determine the [connection information](<./README.md>) for your SkySQL database service: | Option | Description | | --- | --- | -| host | The fully Qualified Domain Name in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | -| port | The Read-Write Port or Read-Only Port in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | +| host | The fully Qualified Domain Name from the "Connect" window in SkySQL portal | +| port | The Read-Write Port or Read-Only Port from the "Connect" window in SkySQL portal | | user | The desired username, which might be the default username in the Service Credentials view | | password | The user's password, which might be the default password in the Service Credentials view if it was not yet customized | | database | Database name to establish a connection to. No default is configured. | @@ -63,7 +70,7 @@ Determine the [connection information](https://mariadb.com/docs/skysql-previous # Code Example: Connect -The following code example connects using the database and user account created in the [example setup](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/nodejs/example-setup/): +The following code example connects using the database and user account created in the [example setup](https://mariadb.com/docs/server/connect/programming-languages/c/example-setup/): ```jsx const mariadb = require('mariadb/callback'); @@ -115,11 +122,13 @@ Node.js developers can use MariaDB Connector/Node.js to establish client connect # Require Promise API -MariaDB Connector/Node.js provides two different connection implementations: one built on the Promise API and the other built on the [Callback API](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/nodejs/callback/). Promise is the default. +MariaDB Connector/Node.js provides two different connection implementations: one built on the Promise API and the other built on the [Callback API](https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/callback-api.md). Promise is the default. To use the Promise API, use the `mariadb` module: -**`const** mariadb = require**(**'mariadb'**);**` +```js +const** mariadb = require**(**'mariadb'**); +``` # Connect @@ -127,17 +136,14 @@ To use the Promise API, use the `mariadb` module: The `createConnection(options)` returns a `Promise` that resolves to a `Connection` object if no error occurs, and rejects with an `Error` object if an error occurs. -Determine the [connection information](https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/) for your SkySQL database service: +Determine the [connection information](<./README.md>) for your SkySQL database service: | Option | Description | | --- | --- | -| host | The fully Qualified Domain Name in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | -| port | The Read-Write Port or Read-Only Port in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | +| host | The fully Qualified Domain Name from the "Connect" window in SkySQL portal | +| port | The Read-Write Port or Read-Only Port from the "Connect" window in SkySQL portal | | user | The desired username, which might be the default username in the Service Credentials view | | password | The user's password, which might be the default password in the Service Credentials view if it was not yet customized | -| ssl.ca | The contents of the skysql_chain.pem file containing the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/#Certificate_Authority_Chain -• https://supplychain.mariadb.com/skysql_chain.pem -• https://supplychain.mariadb.com/aws_skysql_chain.pem | | database | Database name to establish a connection to. No default is configured. | | connectTimeout | Connection timeout in milliseconds. In Connector/Node.js 2.5.6, the default value changed to 1000. The default value for earlier versions is 10000. | | rowsAsArray | A boolean value to indicate whether to return result sets as array instead of the default JSON. Arrays are comparatively faster. | @@ -158,7 +164,7 @@ MDB_PASS = db_user_password # Code Example: Connect -The following code example connects using the database and user account created in [Setup for Examples](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/nodejs/example-setup/): +The following code example connects using the database and user account created in [Setup for Examples](https://mariadb.com/docs/server/connect/programming-languages/c/example-setup/): ```jsx // Required Modules @@ -211,16 +217,3 @@ main(); - In the `try` block, create a new connection using the `mariadb#createConnection(options)` function in the Promise API. - Send error messages if any to the console in the `catch` block. - When you are done with a connection, close it to free resources. Close the connection using the `close()` function. - ---- - -| Connector | MariaDB Connector/Node.js | -| --- | --- | -| Supported Versions | https://mariadb.com/docs/server/release-notes/mariadb-connector-nodejs-2-5/https://mariadb.com/docs/server/release-notes/mariadb-connector-nodejs-3-2/ | -| Programming Language | JavaScript | -| Programming Language Version | • Connector/Node.js 2.5: Node.js 16 -• Connector/Node.js 3.2: Node.js 16, 18, 20 | -| API | Promise APICallback API | -| Supports TLS | Yes | -| Supports Connection Pools | Yes | -| License | GNU Lesser General Public License v2.1 | diff --git "a/docs/Connecting to Sky DBs/Connect from \342\200\230C++\342\200\231 App.md" "b/docs/Connecting to Sky DBs/Connect from \342\200\230C++\342\200\231 App.md" index 45373390..162ddc32 100644 --- "a/docs/Connecting to Sky DBs/Connect from \342\200\230C++\342\200\231 App.md" +++ "b/docs/Connecting to Sky DBs/Connect from \342\200\230C++\342\200\231 App.md" @@ -2,7 +2,7 @@ MariaDB Connector/C++ enables C++ applications to establish client connections to SkySQL over TLS. -# Requirement +# Requirements MariaDB Connector/C++ has dependencies. You must install MariaDB Connector/C to use it. @@ -17,50 +17,66 @@ For additional information, see "[MariaDB Connector/C++ Release Notes](https://m To install MariaDB Connector/C++ on Linux: -1. [Install MariaDB Connector/C](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/c/install/). -2. Go to the [MariaDB Connector C++ download page](https://mariadb.com/downloads/?tab=connectors&group=connectors_dataaccess&product=C%2B%2B+connector). +1. [Install MariaDB Connector/C](https://mariadb.com/docs/server/connect/programming-languages/c/install/). +2. Go to the [MariaDB Connector C++ download page](https://mariadb.com/downloads/connectors/connectors-data-access/cpp-connector). 3. In the "OS" dropdown, select the Linux distribution you want to use. 4. Click the "Download" button to download the binary tarball. 5. Extract the tarball: - `$ tar -xvzf mariadb-connector-cpp-*.tar.gz` + ```bash + tar -xvzf mariadb-connector-cpp-*.tar.gz + ``` 6. Change into the relevant directory: - `$ cd mariadb-connector-cpp-*/` + ```bash + cd mariadb-connector-cpp-*/ + ``` 7. Install the directories for the header files: - `$ sudo install -d /usr/include/mariadb/conncpp - $ sudo install -d /usr/include/mariadb/conncpp/compat` + ```bash + sudo install -d /usr/include/mariadb/conncpp + sudo install -d /usr/include/mariadb/conncpp/compat + ``` 8. Install the header files: - `$ sudo install include/mariadb/* /usr/include/mariadb/ - $ sudo install include/mariadb/conncpp/* /usr/include/mariadb/conncpp - $ sudo install include/mariadb/conncpp/compat/* /usr/include/mariadb/conncpp/compat` + ```bash + sudo install include/mariadb/* /usr/include/mariadb/ + sudo install include/mariadb/conncpp/* /usr/include/mariadb/conncpp + sudo install include/mariadb/conncpp/compat/* /usr/include/mariadb/conncpp/compat + ``` 9. Install the directories for the shared libraries: - On CentOS, RHEL, Rocky Linux: - `$ sudo install -d /usr/lib64/mariadb - $ sudo install -d /usr/lib64/mariadb/plugin` + ```bash + sudo install -d /usr/lib64/mariadb + sudo install -d /usr/lib64/mariadb/plugin + ``` - On Debian, Ubuntu: - `$ sudo install -d /usr/lib/mariadb - $ sudo install -d /usr/lib/mariadb/plugin` + ```bash + sudo install -d /usr/lib/mariadb + sudo install -d /usr/lib/mariadb/plugin + ``` 10. Install the shared libraries: - On CentOS, RHEL, Rocky Linux: - `$ sudo install lib64/mariadb/libmariadbcpp.so /usr/lib64 - $ sudo install lib64/mariadb/plugin/* /usr/lib64/mariadb/plugin` + ```bash + sudo install lib64/mariadb/libmariadbcpp.so /usr/lib64 + sudo install lib64/mariadb/plugin/* /usr/lib64/mariadb/plugin + ``` - On Debian, Ubuntu: - `$ sudo install lib/mariadb/libmariadbcpp.so /usr/lib - $ sudo install lib/mariadb/plugin/* /usr/lib/mariadb/plugin` + ```bash + sudo install lib/mariadb/libmariadbcpp.so /usr/lib + sudo install lib/mariadb/plugin/* /usr/lib/mariadb/plugin + ``` # Windows Installation (MSI) @@ -68,7 +84,7 @@ To install MariaDB Connector/C++ on Linux: To install MariaDB Connector/C++ on Windows: 1. MariaDB Connector/C dependency will be installed when Connector/C++ is installed. -2. Go to the [MariaDB Connector C++ download page for MS Windows](https://mariadb.com/downloads/?tab=connectors&group=connectors_dataaccess&product=C%2B%2B+connector&os=MS+Windows+(64-bit)). +2. Go to the [MariaDB Connector C++ download page for MS Windows](https://mariadb.com/downloads/connectors/connectors-data-access/cpp-connector). 3. Click the "Download" button to download the MSI package. 4. Run the MSI package and click "Next" to start the Setup Wizard. 5. On the second screen, click the license agreement checkbox, then click "Next." @@ -77,12 +93,7 @@ To install MariaDB Connector/C++ on Windows: 8. Click "Finish." 9. Add the directory path that contains the `mariadbcpp` `LIB` file (example `"C:\Program Files\MariaDB\MariaDB C++ Connector 64-bit"`) to `PATH` environment variable. -# Latest Software Releases - -| Version | Latest Release | Latest Release Date | Maturity | -| --- | --- | --- | --- | -| MariaDB Connector/C++ 1.1 | https://mariadb.com/docs/server/release-notes/mariadb-connector-cpp-1-1/1-1-2/ | 2022-11-30 | Release Candidate | -| MariaDB Connector/C++ 1.0 | https://mariadb.com/docs/server/release-notes/mariadb-connector-cpp-1-0/1-0-2/ | 2022-10-11 | General Availability | +For latest release visit [C & C++ Connectors](https://mariadb.com/kb/en/mariadb-connector-c/) # Connection Info @@ -90,13 +101,10 @@ The connection is configured via the information that is initially acquired from | What to set | Where to find it | | --- | --- | -| Hostname in the URL | The fully Qualified Domain Name in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | -| Port number in the URL | The Read-Write Port or Read-Only Port in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | +| Hostname in the URL | The fully Qualified Domain Name from the "Connect" window in SkySQL portal | +| Port number in the URL | The Read-Write Port or Read-Only Port from the "Connect" window in SkySQL portal | | user parameter | The desired username, which might be the default username in the Service Credentials view | | password parameter | The user's password, which might be the default password in the Service Credentials view if it was not yet customized | -| tlsCert parameter | The path to the skysql_chain.pem file containing the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/#Certificate_Authority_Chain -• https://supplychain.mariadb.com/skysql_chain.pem -• https://supplychain.mariadb.com/aws_skysql_chain.pem | # Connection URL Syntax @@ -104,7 +112,9 @@ While MariaDB Connector/C++ supports several connection styles, we are going to The base URL is specified as follows: -`jdbc:mariadb://example.skysql.com:5001/dbname` +```java +jdbc:mariadb://example.skysql.com:5001/dbname +``` If the trailing database name is left off of the URL, the connection will start without selecting a database. @@ -116,23 +126,20 @@ In the following list, we've left out any parameters that aren't pertinent to ac | Parameter Name | Description | Type | Default | Aliases | | --- | --- | --- | --- | --- | -| autoReconnect | Defines whether the connector automatically reconnects after a connection failure. | bool | false | • OPT_RECONNECT | +| autoReconnect | Defines whether the connector automatically reconnects after a connection failure. | bool | false | OPT_RECONNECT | | connectTimeout | Defines the connect timeout value in milliseconds. When set to 0, there is no connect timeout. | int | 30000 | | -| enabledTlsCipherSuites | A list of permitted ciphers or cipher suites to use for TLS. | string | | • enabledSslCipherSuites -• enabledSSLCipherSuites | -| jdbcCompliantTruncation | This mode is enabled by default. This mode configures the connector to add STRICT_TRANS_TABLES to https://mariadb.com/docs/server/ref/mdb/system-variables/sql_mode/https://mariadb.com/docs/server/ref/mdb/system-variables/sql_mode/, which causes ES to handle truncation issues as errors instead of warnings. | bool | true | | +| enabledTlsCipherSuites | A list of permitted ciphers or cipher suites to use for TLS. | string | | enabledSslCipherSuites | +| jdbcCompliantTruncation | This mode is enabled by default. This mode configures the connector to add STRICT_TRANS_TABLES to [sql_mode](https://mariadb.com/docs/server/ref/mdb/system-variables/sql_mode/), which causes ES to handle truncation issues as errors instead of warnings. | bool | true | | | password | Defines the password of the user account to connect with. | | | | -| socketTimeout | Defines the network socket timeout (SO_TIMEOUT) in milliseconds. When set to 0, there is no socket timeout. This connection parameter is not intended to set a maximum time for statements. To set a maximum time for statements, please see the https://mariadb.com/docs/server/ref/mdb/system-variables/max_statement_time/https://mariadb.com/docs/server/ref/mdb/system-variables/max_statement_time/https://mariadb.com/docs/server/ref/mdb/system-variables/max_statement_time/ system variable. | int | 0 | • OPT_READ_TIMEOUT | -| tcpRcvBuf | The buffer size for TCP/IP and socket communication. tcpSndBuf changes the same buffer value, and the biggest value of the two is selected. | int | 0x4000 | • tcpSndBuf | -| tcpSndBuf | The buffer size for TCP/IP and socket communication. tcpRcvBuf changes the same buffer value, and the biggest value of the two is selected. | int | 0x4000 | • tcpRcvBuf | -| tlsCert | Path to the X509 certificate file. | string | | • sslCert | -| tlsCRL | Path to a PEM file that should contain one or more revoked X509 certificates. | string | | • tlsCrl -• sslCRL | -| useCompression | Compresses network traffic between the client and server. | bool | false | • CLIENT_COMPRESS | -| user | Defines the user name of the user account to connect with. | | | • userName | -| useServerPrepStmts | Defines whether the connector uses server-side prepared statements using the https://mariadb.com/docs/skysql-previous-release/ref/mdb/sql-statements/PREPARE/, https://mariadb.com/docs/skysql-previous-release/ref/mdb/sql-statements/EXECUTE/, and https://mariadb.com/docs/skysql-previous-release/ref/mdb/sql-statements/DROP_PREPARE/ statements. By default, the connector uses client-side prepared statements. | bool | false | | -| useTls | Whether to force TLS. This enables TLS with the default system settings. | bool | | • useSsl -• useSSL | +| socketTimeout | Defines the network socket timeout (SO_TIMEOUT) in milliseconds. When set to 0, there is no socket timeout. This connection parameter is not intended to set a maximum time for statements. To set a maximum time for statements, please see the [max_statement_time](https://mariadb.com/docs/server/ref/mdb/system-variables/max_statement_time/). | int | 0 | OPT_READ_TIMEOUT | +| tcpRcvBuf | The buffer size for TCP/IP and socket communication. tcpSndBuf changes the same buffer value, and the biggest value of the two is selected. | int | 0x4000 | tcpSndBuf | +| tcpSndBuf | The buffer size for TCP/IP and socket communication. tcpRcvBuf changes the same buffer value, and the biggest value of the two is selected. | int | 0x4000 | tcpRcvBuf | +| tlsCert | Path to the X509 certificate file. | string | | sslCert | +| tlsCRL | Path to a PEM file that should contain one or more revoked X509 certificates. | string | | tlsCrl| +| useCompression | Compresses network traffic between the client and server. | bool | false | CLIENT_COMPRESS | +| user | Defines the user name of the user account to connect with. | | | userName | +| useServerPrepStmts | Defines whether the connector uses server-side prepared statements using the [PREPARE Statement](https://mariadb.com/kb/en/prepare-statement/), [EXECUTE statement](https://mariadb.com/kb/en/execute-statement/), and [DEALLOCATE / DROP PREPARE statements](https://mariadb.com/kb/en/deallocate-drop-prepare/) statements. By default, the connector uses client-side prepared statements. | bool | false | | +| useTls | Whether to force TLS. This enables TLS with the default system settings. | bool | | useSsl| # Connection Methods @@ -223,7 +230,7 @@ try { # Code Example: Connect -The following code demonstrates how to connect using the [example database and user account](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/cpp/example-setup/): +The following code demonstrates how to connect using the [example database and user account](https://mariadb.com/docs/server/connect/programming-languages/c/example-setup/): ```cpp // Includes diff --git "a/docs/Connecting to Sky DBs/Connect from \342\200\230C\342\200\231 App.md" "b/docs/Connecting to Sky DBs/Connect from \342\200\230C\342\200\231 App.md" index d77f38a4..db847357 100644 --- "a/docs/Connecting to Sky DBs/Connect from \342\200\230C\342\200\231 App.md" +++ "b/docs/Connecting to Sky DBs/Connect from \342\200\230C\342\200\231 App.md" @@ -2,7 +2,7 @@ MariaDB Connector/C enables C and C++ applications to establish client connections to SkySQL over TLS. MariaDB Connector/C is a native connector that is written in C. -## First [Install MariaDB Connector/C](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/c/install/) +## First [Install MariaDB Connector/C](https://mariadb.com/docs/server/connect/programming-languages/c/install/) MariaDB Connector/C enables C and C++ applications to establish client connections to SkySQL and MariaDB database products over TLS. @@ -14,17 +14,14 @@ The connection is configured via the information that is initially acquired from | Function | Option/Argument | Where to find it | | --- | --- | --- | -| mysql_optionsv() | MYSQL_OPT_SSL_CA option | The path to the skysql_chain.pem file containing the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/#Certificate_Authority_Chain -• https://supplychain.mariadb.com/skysql_chain.pem -• https://supplychain.mariadb.com/aws_skysql_chain.pem | -| mysql_real_connect() | host argument | The fully Qualified Domain Name in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | +| mysql_real_connect() | host argument | The fully Qualified Domain Name from the "Connect" window in SkySQL portal | | mysql_real_connect() | user argument | The desired username, which might be the default username in the Service Credentials view | | mysql_real_connect() | passwd argument | The user's password, which might be the default password in the Service Credentials view if it was not yet customized | -| mysql_real_connect() | port argument | The Read-Write Port or Read-Only Port in the https://mariadb.com/docs/skysql-previous-release/connect/connection-parameters-portal/ | +| mysql_real_connect() | port argument | The Read-Write Port or Read-Only Port from the "Connect" window in SkySQL portal | # Code Example -The following code demonstrates how to use MariaDB Connector/C to connect to SkySQL. This example uses the [example database and user account](https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/c/example-setup/): +The following code demonstrates how to use MariaDB Connector/C to connect to SkySQL. This example uses the [example database and user account](https://mariadb.com/docs/server/connect/programming-languages/c/example-setup/): ```c #include diff --git a/docs/Connecting to Sky DBs/Connect using Connector R2DBC.md b/docs/Connecting to Sky DBs/Connect using Connector R2DBC.md index f1888f57..dada3beb 100644 --- a/docs/Connecting to Sky DBs/Connect using Connector R2DBC.md +++ b/docs/Connecting to Sky DBs/Connect using Connector R2DBC.md @@ -2,24 +2,8 @@ Java developers can use MariaDB Connector/R2DBC to connect to SkySQL using the Reactive Relational Database Connectivity (R2DBC) API. R2DBC operations are non-blocking, which makes the R2DBC API more scalable than Java's standard JDBC API. MariaDB Connector/R2DBC is available both with a native R2DBC implementation and the Spring Data R2DBC framework. -| Connector | MariaDB Connector/R2DBC | MariaDB Connector/R2DBC | -| --- | --- | --- | -| Supported Versions | 1.0 | 1.1 | -| Programming Language | Java | Java | -| Programming Language Version | Java 8+ | Java 8+ | -| API | https://r2dbc.io/spec/0.8.5.RELEASE/spec/html/ | https://r2dbc.io/spec/1.0.0.RELEASE/spec/html | -| Supports TLS | Yes | Yes | -| Supports Connection Pools | Yes | Yes | -| License | Apache 2.0 | Apache 2.0 | +Visit [MariaDB R2DBC Connector](https://mariadb.com/docs/server/connect/programming-languages/java-r2dbc/) page. # Resources - [Release notes](https://mariadb.com/docs/server/release-notes/mariadb-connector-r2dbc/) - -### **Framework-Specific Documentation** - -For details on how to use MariaDB Connector/R2DBC, choose a supported framework: - -| https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/java-r2dbc/native/ | The native implementation of R2DBC can be used to connect using MariaDB Connector/R2DBC from within your Java application. | -| --- | --- | -| https://mariadb.com/docs/skysql-previous-release/connect/programming-languages/java-r2dbc/spring/ | Spring Data implementation of R2DBC allows you to connect using MariaDB Connector/R2DBC using the Spring Framework. | diff --git a/docs/Connecting to Sky DBs/Connect using MariaDB CLI b/docs/Connecting to Sky DBs/Connect using MariaDB CLI deleted file mode 100644 index ba61eeb6..00000000 --- a/docs/Connecting to Sky DBs/Connect using MariaDB CLI +++ /dev/null @@ -1,144 +0,0 @@ - -MariaDB Client is available for Linux and Windows - - -## (I) Installation -Installation of MariaDB Client varies by operating system. - -### CentOS / RHEL -1. Configure YUM package repositories: - -```shell -$ sudo yum install wget -$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup -$ echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \ - | sha256sum -c - - -$ chmod +x mariadb_repo_setup - -$ sudo ./mariadb_repo_setup \ - --mariadb-server-version="mariadb-10.11" -``` - -2. Install MariaDB Client and package dependencies: - -```shell -$ sudo yum install MariaDB-client -``` - -### Debian / Ubuntu -1. Configure APT package repositories: - -``` shell -$ sudo apt install wget - -$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup - -$ echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \ - | sha256sum -c - - -$ chmod +x mariadb_repo_setup - -$ sudo ./mariadb_repo_setup \ - --mariadb-server-version="mariadb-10.11" - -$ sudo apt update -``` - -2. Install MariaDB Client and package dependencies: - -```shell -$ sudo apt install mariadb-client -``` - -### SLES -1. Configure ZYpp package repositories: - -```shell -$ sudo zypper install wget - -$ wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup - -$ echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \ - | sha256sum -c - - -$ chmod +x mariadb_repo_setup - -$ sudo ./mariadb_repo_setup \ - --mariadb-server-version="mariadb-10.6" -``` - -2. Install MariaDB Client and package dependencies: -```shell -$ sudo zypper install MariaDB-client -``` - -### Windows -1. Access [MariaDB Downloads](https://mariadb.com/downloads/community/community-server/) for MariaDB Community Server. - -2. In the "Version" dropdown, select the version you want to download. - -3. In the "OS" dropdown, select "MS Windows (64-bit)". - -4. Click the "Download" button to download the MSI package. - -5. When the MSI package finishes downloading, run it. - -6. On the first screen, click "Next" to start the Setup Wizard. - -7. On the second screen, click the license agreement checkbox, and then click "Next". - -8. On the third screen, select the components you want to install. If you only want the standard MariaDB Client tools: - - - Deselect "Database instance". - - Deselect "Backup utilities". - - Deselect "Development Components". - - Deselect "Third party tools". - -When only "Client programs" is selected, click "Next". - -9. On the next screen, click "Install". - -10. When the installation process completes, click "Finish". - -## (II) Connect -### Linux -1. Determine the connection parameters for your MariaDB SkySQL service. - -2. Use your connection parameters in the following command line: - -```shell -mariadb --host dbpwf03798702.sysp0000.db1.skysql.com --port 3306 --user dbpwf03798702 -p --ssl-verify-server-cert -``` - -- Replace 'dbpwf03798702.sysp0000.db1.skysql.com' with the Fully Qualified Domain Name of your service. - -- You can use 3307 for the port if running with Replicas. This is the read-only port of your service. - -- Replace the user name with the one for your service. - -4. After the command is executed, you will be prompted for the password of your database user account. 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. - -### Windows -1. Fix your executable search path. - -2. On Windows, MariaDB Client 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: - -```shell -$ SET "PATH=C:\Program Files\MariaDB 10.6\bin;%PATH%" -``` - -3. Use your connection parameters in the following command line: - -```shell -mariadb --host dbpwf03798702.sysp0000.db1.skysql.com --port 3306 --user dbpwf03798702 -p --ssl-verify-server-cert -``` - -- Replace 'dbpwf03798702.sysp0000.db1.skysql.com' with the Fully Qualified Domain Name of your service. - -- You can use 3307 for the port if running with Replicas. This is the read-only port of your service. - -- Replace the user name with the one for your service. - -4. After the command is executed, you will be prompted for the password of your database user account. 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. - diff --git a/docs/Connecting to Sky DBs/Connect using MariaDB CLI.md b/docs/Connecting to Sky DBs/Connect using MariaDB CLI.md new file mode 100644 index 00000000..65062e28 --- /dev/null +++ b/docs/Connecting to Sky DBs/Connect using MariaDB CLI.md @@ -0,0 +1,149 @@ + +MariaDB Client is available for Linux and Windows + + +## 1. Installation +Installation of MariaDB Client varies by operating system. + +### CentOS / RHEL + +1. Configure YUM package repositories: + + ```bash + sudo yum install wget + wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup + echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \ + | sha256sum -c - + + chmod +x mariadb_repo_setup + + sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.11" + ``` + +2. Install MariaDB Client and package dependencies: + + ```shell + sudo yum install MariaDB-client + ``` + +### Debian / Ubuntu + +1. Configure APT package repositories: + + ``` shell + sudo apt install wget + + wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup + + echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \ + | sha256sum -c - + + chmod +x mariadb_repo_setup + + sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.11" + + sudo apt update + ``` + +2. Install MariaDB Client and package dependencies: + + ```shell + sudo apt install mariadb-client + ``` + +### SLES + +1. Configure ZYpp package repositories: + + ```shell + sudo zypper install wget + + wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup + + echo "30d2a05509d1c129dd7dd8430507e6a7729a4854ea10c9dcf6be88964f3fdc25 mariadb_repo_setup" \ + | sha256sum -c - + + chmod +x mariadb_repo_setup + + sudo ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6" + ``` + +2. Install MariaDB Client and package dependencies: + ```shell + sudo zypper install MariaDB-client + ``` + +### Windows + +1. Access [MariaDB Downloads](https://mariadb.com/downloads/community/community-server/) for MariaDB Community Server. + +2. In the "Version" dropdown, select the version you want to download. + +3. In the "OS" dropdown, select "MS Windows (64-bit)". + +4. Click the "Download" button to download the MSI package. + +5. When the MSI package finishes downloading, run it. + +6. On the first screen, click "Next" to start the Setup Wizard. + +7. On the second screen, click the license agreement checkbox, and then click "Next". + +8. On the third screen, select the components you want to install. If you only want the standard MariaDB Client tools: + + - Deselect "Database instance". + - Deselect "Backup utilities". + - Deselect "Development Components". + - Deselect "Third party tools". + + When only "Client programs" is selected, click "Next". + +9. On the next screen, click "Install". + +10. When the installation process completes, click "Finish". + +## 2. Connect + +### Linux + +1. Determine the connection parameters for your SkySQL service. + +2. Use your connection parameters in the following command line: + + ```shell + mariadb --host dbpwf03798702.sysp0000.db1.skysql.com --port 3306 \ + --user dbpwf03798702 -p --ssl-verify-server-cert + ``` + + - Replace 'dbpwf03798702.sysp0000.db1.skysql.com' with the Fully Qualified Domain Name of your service. + + - You can use 3307 for the port if running with Replicas. This is the read-only port of your service. + + - Replace the user name with the one for your service. + +3. After the command is executed, you will be prompted for the password of your database user account. 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. + +### Windows + +1. Fix your executable search path. + +2. On Windows, MariaDB Client 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: + + ```shell + SET "PATH=C:\Program Files\MariaDB 10.6\bin;%PATH%" + ``` + +3. Use your connection parameters in the following command line: + + ```shell + mariadb --host dbpwf03798702.sysp0000.db1.skysql.com --port 3306 \ + --user dbpwf03798702 -p --ssl-verify-server-cert + ``` + + - Replace 'dbpwf03798702.sysp0000.db1.skysql.com' with the Fully Qualified Domain Name of your service. + + - You can use 3307 for the port if running with Replicas. This is the read-only port of your service. + + - Replace the user name with the one for your service. + +4. After the command is executed, you will be prompted for the password of your database user account. 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. diff --git a/docs/Connecting to Sky DBs/Connect using ODBC.md b/docs/Connecting to Sky DBs/Connect using ODBC.md index d79c0853..3972f7c9 100644 --- a/docs/Connecting to Sky DBs/Connect using ODBC.md +++ b/docs/Connecting to Sky DBs/Connect using ODBC.md @@ -12,7 +12,7 @@ The method for configuring the data source varies between operating systems. For example, on CentOS / RHEL / Rocky Linux: - ``` + ```ini [MariaDB ODBC 3.1 Driver] Description = MariaDB Connector/ODBC v.3.1 Driver = /usr/lib64/libmaodbc.so @@ -20,7 +20,7 @@ The method for configuring the data source varies between operating systems. On Debian / Ubuntu: - ``` + ```ini [MariaDB ODBC 3.1 Driver] Description = MariaDB Connector/ODBC v.3.1 Driver = /usr/lib/libmaodbc.so @@ -31,17 +31,15 @@ The method for configuring the data source varies between operating systems. For example: ```bash - $ sudo odbcinst -i -d -f MariaDB_odbc_driver_template.ini - odbcinst: Driver installed. Usage count increased to 1. - Target directory is /etc + sudo odbcinst -i -d -f MariaDB_odbc_driver_template.ini ``` - + 3. Determine the connection parameters for your database. 4. Configure `unixODBC` to connect to the data source by creating a file called `MariaDB_odbc_data_source_template.ini`with the relevant data source parameters. Be sure to specify `SSLVERIFY = 1` for your SkySQL database. For example: - ``` + ```ini # Data Source for unixODBC [My-Test-Server] Description = Describe your database setup here @@ -55,7 +53,7 @@ The method for configuring the data source varies between operating systems. DATABASE = test ``` - ``` + ```ini # Data Source for unixODBC [My-Test-Server] Description = Describe your database setup here @@ -73,7 +71,7 @@ The method for configuring the data source varies between operating systems. - Customize the values of the parameters with the relevant information for your environment. - If you have SSL certificate files, you can add the following parameters to your data source file: - ``` + ```bash SSLCA = /path/to/ca-cert.pem SSLKEY = /path/to/client-key.pem SSL_CERT = /path/to/client-cert.pem @@ -88,7 +86,7 @@ The method for configuring the data source varies between operating systems. 6. Test the data source `My-Test-Server`configured in the `MariaDB_odbc_data_source_template.ini` file using the `isql` command. If you see the output below, you have successfully connected to your Sky database. - ``` + ```bash $ isql -v My-Test-Server +-------------------------+ | Connected! | @@ -105,7 +103,7 @@ file using the `isql` command. If you see the output below, you have successfull 1. Confirm that MariaDB Connector/ODBC has been registered with`iODBC` by confirming that the following options are set in the `iODBC`configuration file at `/Library/ODBC/odbcinst.ini`: - ``` + ```ini [ODBC] Trace = no TraceFile = /tmp/iodbc_trace.log @@ -122,7 +120,7 @@ file using the `isql` command. If you see the output below, you have successfull 2. Determine the connection parameters for your database. 3. Add a data source for your database to `iODBC` by adding the following options to the `iODBC` configuration file at `/Library/ODBC/odbc.ini`: - ``` + ```ini [ODBC Data Sources] My-Test-Server = MariaDB ODBC 3.1 Unicode Driver @@ -137,8 +135,8 @@ file using the `isql` command. If you see the output below, you have successfull - Substitute the values of the `SERVER`, `SOCKET`, `DATABASE`, `PORT`, `USER`, and `PASSWORD` parameters with the relevant value for your environment. 4. Test the data source using the `iodbctest`command: - ``` - $ iodbctest "DSN=My-Test-Server" + ```bash + iodbctest "DSN=My-Test-Server" ``` 5. To select your new data source in your application, select the data source with the name that you configured, which is `My-Test-Server` in the above example. @@ -188,7 +186,8 @@ MariaDB Connector/ODBC supports failover in case one or more hosts are not avail The failover feature requires using MariaDB Connector/ODBC 3.1.16 or greater with MariaDB Connector/C 3.3 or greater. -MariaDB Connector/ODBC 3.1.16 and greater is statically linked for Windows and macOS with MariaDB Connector/C 3.3.1. MariaDB Connector/ODBC 3.1.16 and greater is dynamically linked for Linux with MariaDB Connector/C. +`MariaDB Connector/ODBC 3.1.16` and greater is statically linked for Windows and macOS with `MariaDB Connector/C 3.3.1`. +`MariaDB Connector/ODBC 3.1.16` and greater is dynamically linked for Linux with MariaDB Connector/C. The failover feature is enabled by providing a comma separated list of hosts as a server name. @@ -204,7 +203,9 @@ The following syntax is required: An example of a failover host string: -`[::1]:3306,192.168.0.1:3307,test.example.com` +```bash +[::1]:3306,192.168.0.1:3307,test.example.com +``` ## Connection Parameters @@ -220,7 +221,7 @@ An example of a failover host string: | FORWARDONLY | When enabled, cursors are created as SQL_CURSOR_FORWARD_ONLY, so they can only move forward. Starting in Connector/ODBC 3.2, cursors are SQL_CURSOR_FORWARD_ONLY by default. In previous releases, cursors are created as SQL_CURSOR_STATIC by default. | | | NO_CACHE | When enabled, result set streaming is enabled, which enables the application to fetch result sets from the server row-by-row instead of caching the entire result set on the client side. Since the application is not caching the entire result set, the application is less likely to run out of memory when working with large result sets. | | | STREAMRS | Alias for the NO_CACHE connection parameter. | | -| OPTIONS | See about:blank#OPTIONS_Bitmaskabout:blank#OPTIONS_Bitmask. | | +| OPTIONS | See [OPTIONS Bitmask](#options-bitmask) | | | PREPONCLIENT | When enabled, the SQLPrepare ODBC API function uses the text protocol and client-side prepared statements (CSPS). | | | ATTR | Sets connection attributes that can be queried via the Performance Schema session_connect_attrs Table when the Performance Schema is enabled. Specify attributes in the format ATTR={=[,=[,` symbol redirects the output to a file named `dump.sql`. -2. An optional step - Once you have exported the data, you need to transfer the `dump.sql` file to the destination server where you can efficiently connect to your MariaDB SkySQL database. This is typically the same cloud provider region where your Sky DB is running. -3. After transferring the file, connect to the MariaDB SkySQL server using the command-line client or a GUI tool. This will allow you to interact with the server and perform administrative tasks. -4. If you haven't already created a database in the MariaDB SkySQL server, you can do so using the `CREATE DATABASE` statement. This step is necessary if you want to import the data into a new database. If you already have a database in which you want to import the data, you can skip this step. +2. An optional step - Once you have exported the data, you need to transfer the `dump.sql` file to the destination server where you can efficiently connect to your SkySQL database. This is typically the same cloud provider region where your Sky DB is running. +3. After transferring the file, connect to the SkySQL server using the command-line client or a GUI tool. This will allow you to interact with the server and perform administrative tasks. +4. If you haven't already created a database in the SkySQL server, you can do so using the `CREATE DATABASE` statement. This step is necessary if you want to import the data into a new database. If you already have a database in which you want to import the data, you can skip this step. 5. Finally, import the data from the `dump.sql` file into the destination database using the `mariadb or mysql` command. This command reads the SQL statements in the file and executes them in the specified database. Here's an example command: ```bash @@ -36,10 +36,10 @@ To export data from a MySQL/MariaDB database and import it into MariaDB SkySQL, mariadb --host dbpwp27784332.orgtd5j0.db1.skysql.mariadb.com --port 3306 --user dbpwp27784332 -p [database_name] < dump.sql ``` - Replace `[hostname], username]` with your MariaDB 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`. + 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`. -By following these steps, you will be able to export data from your MySQL/MariaDB database and import it into MariaDB SkySQL, ensuring a smooth transition of your data. +By following these steps, you will be able to export data from your MySQL/MariaDB database and import it into SkySQL, ensuring a smooth transition of your data.