-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand DB support for MySQL #6534
Comments
Harbor only supports PostgreSQL currently due to the limitation of the upstream repository. |
Is this a recent change? I researched this before I began and there were several, albeit incomplete, postings about setting up harbor with MySQL. If this can ONLY work with PostgreSQL, it probably should be stated in the docs about using external databases. What's the point of DATABASE_TYPE in the env file? |
The change is introduced in version 1.6.0, and the |
After switching to pgSQL, there're some discussion to provide a abstraction layer and make Harbor DB adaptable to different DB, incl. pg, mysql But I don't think it's gonna happen in near future. |
A lot of users are stuck on an older version due to lack of support for mysql, they don't have a HA solution around pgsql. Especially lots of users in China. Good idea to consider pluggable DB solution. |
Other DBs to consider:
|
I am blocked because of this issue. Could you provide more details regarding the roadmap? Thanks |
I think mysql or mariadb is preferred, different thinking with @WSLUser. |
Whether the support of MySQL database has been considered? This ability is urgently needed. |
Also very much looking forward to supporting mysql or mariadb. |
Im waiting this aswell |
+1 for MariaDB |
After long long time... ... |
👍 |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
Hi,
I am running harbor in Docker version 18.09.0, build 4d60db4 on Ubuntu 18.04. I have pulled the latest version and got it set up and running fine with the default postgres. Now I want to change it to use mysql.
I created a new container for mysql running on 3306:33006 and I can access it from the host shell. I have used mysql workbench to migrate the registry database and have it loaded in mysql.
I have updated my harbor.cfg file as such:
#######Harbor DB configuration section#######
#The address of the Harbor database. Only need to change when using external db.
db_host = 192.168.222.79
#The password for the root user of Harbor DB. Change this before any production use.
db_password = mypassword
#The port of Harbor database host
db_port = 3306
#The user name of Harbor database
db_user = root
End of Harbor DB configuration#######
and then ran "prepare"
I deleted my /data/database directory
I have set up my adminserver/env file as such:
DATABASE_TYPE=mysql
MYSQL_HOST=$db_host
MYSQL_PORT=$db_port
MYSQL_USERNAME=$db_user
MYSQL_PASSWORD=$db_password
MYSQL_DATABASE=registry
MYSQL_PORT=$db_port
RESET=true
When I start the server with docker-compose, I get the following in the adminserver log:
Dec 13 15:48:19 172.21.0.1 adminserver[1175]: 2018-12-13T20:48:19Z [INFO] initializing system configurations...
Dec 13 15:48:19 172.21.0.1 adminserver[1175]: 2018-12-13T20:48:19Z [FATAL] [main.go:46]: failed to initialize the system: invalid database: mysql
Any help here would be appreciated...
Thanks,
Rich
The text was updated successfully, but these errors were encountered: