Skip to main content
  1. Posts/

cPanel UAPI

·1 min·
cpanel cpanel
Table of Contents

UAPI merupakan Command Line untuk mengakses fitur di cPanel. Anda dapat menggunakan API ini untuk mengakses atau mengubah data dan pengaturan pada tingkat pengguna (user).

MySQL and MariaDB
#

Create MySQL database

uapi --user=username \
  Mysql \
  create_database \
  name='newdb'

Delete MySQL database

uapi --user=username \
  Mysql \
  delete_database \
  name='example'

Return MySQL databases

uapi --user=username \
  Mysql \
  list_databases

Update MySQL database name

uapi --user=username \
  Mysql \
  rename_database \
  oldname='mydb' \
  newname='newlyrenamed'

Repair MySQL database tables

uapi --user=username \
  Mysql \
  repair_database \
  name='example_db'

Enable remote MySQL host access

uapi --user=username \
  Mysql \
  add_host \
  host='192.168.1.6'

Add remote MySQL host note

uapi --user=username \
  Mysql \
  add_host_note \
  host='192.168.1.6' \
  note='A remote mysql server for storing my data'

Disable remote MySQL host access

uapi --user=username \
  Mysql \
  delete_host \
  host='remote.example.com'

Return remote MySQL host notes

uapi --user=username \
  Mysql \
  get_host_notes

Referensi: https://api.docs.cpanel.net/cpanel/introduction/

Related

Cara Update Composer di cPanel
·1 min
cpanel composer cpanel
Instal Engintron di cPanel
·1 min
cpanel cpanel
User MySQL Tidak Muncul di CPanel
·1 min
cpanel mysql cpanel
Error 500 in Python Applications using LiteSpeed and CloudLinux
·1 min
cpanel python cpanel cloudlinux litespeed
Install Flask di cPanel
·1 min
cpanel passenger cpanel flask
Scripts cPanel
·4 mins
cpanel cpanel