upgrading an alias to main domain on plesk onyx - plesk-onyx

On Plesk onyx 17.8.11 I have a domain.info and an alias domain.org.
I would set domain.org as main domain and domain.info as alias without affecting the wordpress working with domain.org.
Would be enough changing the main domain name in the hosting setting panel?
Should I first delete the alias domain.org?
thx

Create a backup of domain.info: Domains > domain.info > Backup Manage.
Remove or rename alias domain.org.
Rename domain domain.info to domain.org.

Related

No SQL option on Export of a table in PHPMyAdmin

PHPMyAdmin is showing some strange results when I go to export a table as SQL. If I go to the main database and select Export (i.e. the whole database) at the top it works as expected but when I go to a table and try end export just that table, there is no SQL option in the select list on the "Format:" section.
I am using Server version: 5.5.62(MySQL) and phpmyadmin 4.8.4. This is server wide (happening on all db's on this server)
There is a workaround, I can go to the main database level and export all and only tick the options of the tables I want but want to get this to work.
I have read about a max_input_vars setting but if this was the case, it would not export the whole DB, this just happens at a table level.
Thanks in advance
The fix does work, have applied it to many servers at this point.
Fix # 14775 : edit 'Export.php'
Resolution:
Connect to the server via SSH.
Open file:
/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/classes/Display/Export.php with a text editor.
Note: for Windows, it will be
%plesk_dir%admin\htdocs\domains\databases\phpMyAdmin\libraries\classes\Display\Export.php.
Find line /* Scan for plugins */
Add the following above the line:
// Export a single table
if (isset($_GET['single_table'])) {
$GLOBALS['single_table'] = $_GET['single_table'];
}
This is caused by a bug in version 4.8.4 of phpmyadmin. ppmyadmin team are working on it in this github issue.
There seems to a workaround available (I did not test it myself) : if I select the db, then checkbox the table(s), exporting under "with selected" I get the SQL option.
I am using xampp in ubuntu locally and I don't have /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/classes/Display/Export.php file. SO I searched about this file and I found it here: /opt/lampp/phpmyadmin/libraries/classes/Display/Export.php
After editing this file from the
// Export a single table
if (isset($_GET['single_table'])) {
$GLOBALS['single_table'] = $_GET['single_table'];
}
(as the first answer) resolved my problem.

Openfire configuration to Integrate custom database for MySQL

I am trying to setup OpenFire on Ubuntu for MySQL. The issue is i am not able to authenticate users via Database B.
Here is the configuration i need
1) Database A to keep OpenFire tables.
2) Existing Database B containing user inforamation that i need for user login via openfire
Followed openfire guide for custom database integration.
https://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html
If anyone having similar configuration able to configure openfire successfully, please help.
Here is the openfire.xml, all the properties mentioned in xml are already saved in ofProp table as well..
<jive>
<connectionProvider>
<className>org.jivesoftware.database.DefaultConnectionProvider</className>
</connectionProvider>
<database>
<defaultProvider>
<driver>com.mysql.jdbc.Driver</driver>
<serverURL>jdbc:mysql://localhost:3306/DBOpenFire?rewriteBatchedStatements=true</serverURL>
<username encrypted="true">200a0b84b1fa2jsdsdjds31c2abf99393c0a31a1de5c734edf</username>
<password encrypted="true">67452fbde9c80636f8486ea43932kksddfdksjdsd0b12284eac45455</password>
<testSQL>select 1</testSQL>
<testBeforeUse>false</testBeforeUse>
<testAfterUse>false</testAfterUse>
<minConnections>5</minConnections>
<maxConnections>25</maxConnections>
<connectionTimeout>1.0</connectionTimeout>
</defaultProvider>
</database>
<setup>true</setup>
<provider>
<auth>
<className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className>
</auth>
<user>
<className>org.jivesoftware.openfire.user.JDBCUserProvider</className>
</user>
</provider>
<jdbcProvider>
<driver>com.mysql.jdbc.Driver</driver>
<connectionString>jdbc:mysql://localhost/DBUsers?user=root&password=mypasscode</connectionString>
</jdbcProvider>
<jdbcAuthProvider>
<passwordSQL>SELECT Password from tblUser where UserName=?</passwordSQL>
<passwordType>plain</passwordType>
</jdbcAuthProvider>
<jdbcUserProvider>
<loadUserSQL>SELECT * FROM tblUser where UserName=?</loadUserSQL>
<userCountSQL>SELECT COUNT(*) FROM tblUser</userCountSQL>
<allUsersSQL>SELECT UserName FROM tblUser </allUsersSQL>
<searchSQL>SELECT UserNameFROM tblUser WHERE</searchSQL>
<usernameField>UserName</usernameField>
<nameField>UserName</nameField>
</jdbcUserProvider>
</jive>
ofProperty Values:
jdbcAuthProvider.passwordSQL SELECT UserPassword from tblUser where UserName=?
jdbcAuthProvider.passwordType plain
jdbcProvider.driver com.mysql.jdbc.Driver
jdbcProvider.connectionString jdbc:mysql://localhost:3306/DBUsers?user=root&password=mypasscode
jdbcUserProvider.loadUserSQL SELECT * FROM tblUser where UserName=?
jdbcUserProvider.userCountSQL SELECT COUNT(*) FROM tblUser
jdbcUserProvider.allUsersSQL SELECT UserName FROM tblUser
jdbcUserProvider.searchSQL SELECT UserName FROM tblUser WHERE
jdbcUserProvider.usernameField UserName
jdbcUserProvider.nameField UserName
jdbcUserProvider.useConnectionProvider true
jdbcAuthProvider.useConnectionProvider true
provider.user.className org.jivesoftware.openfire.user.JDBCUserProvider
provider.auth.className org.jivesoftware.openfire.auth.JDBCAuthProvider
admin.authorizedJIDs admin#example.com
Thanks a lot !!!
Can't help with those few informations. Here is what you should do.
1-Check that ubuntu contains the mysql driver to connect.
2-Check the connection to the database B.
provider.auth.className
org.jivesoftware.openfire.auth.JDBCAuthProvider
provider.user.className
org.jivesoftware.openfire.user.JDBCUserProvider
3-Create your custom queries for JID, emails, number of JID
4-Create custom queries for databases in case you use non clear passwords.
5-Create custom queries for groups in case you want use external rosters
FYI: insert those queries in the openfire admin server-properties to avoid rebooting the server. If something went wrong, remove that content from OfProperty table of openfire.
Manoj your configuration seems ok and it should work, I also have such configuration and it works fine.
Have you tried to debug the code?
Have you checked the logs to make sure the code is not crashing?

get Service_Name from the tns file using VBA

is there any way to pull the Service_Name from the TNS file using VBA? since anyone can name their TNS entries anything they want - my pass-through queries won't work on their computers.
if there's a way to setup the queries by using TNS entry itself instead of the SERVICE_NAME - that'd work too. i just want to make sure my database is not computer specific in any way.
for example, here's my DSN-less connection string
[ODBC] DRIVER={Oracle in Oracle1}
UID=username
Pwd=password
DBQ=myTNSEntryName.ourcompany.com
Trusted_Connection=Yes
server=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=ourhost.ourcompany.com)
(PORT=9999)
)
(CONNECT_DATA=
(SERVICE_NAME=myTNSEntryName.ourcompany.com)
) )
and here's my TNS entry
myTNSEntryName.ourcompany.COM=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=ourhost.ourcompany.com)
(PORT=9999)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=ourdatabasename.ourcompany.com)
) )
in the TNS file the SERVICE_NAME is ourdatabasename, but since i named the TNS entry myTNSEntryName - now using report.ourcompany.com as the SERVICE_NAME doesn't work.
thank you
EDIT: to clarify a little, basically i'm looking for a way to set up a DSN'less connection string that i can then use in the ODBC CONNECT STR line in the PROPERTIES of a MS Access Pass-Through query AND in the Docmd.TransferDatabase.
OR, find a way to read the user's TNS Entry name (not the database name, but whatever they choose to name their entires)
The DBQ parameter is the TNS name that you want to use. The Oracle ODBC driver does not use the SERVER or TRUSTED_CONNECTION parameters. Microsoft's ODBC Driver for Oracle uses the SERVER parameter. I'm not sure what, if any, driver might use the trusted_connection parameter or what that might do in an Oracle context. Both of those should be removed.
Of course, the name of the Oracle ODBC driver may well be different on different machines since it contains the name of the Oracle Home and users are free to set that when they install the Oracle client. If you want that to work on arbitrary machines, you'd need to interrogate the ODBC Driver Manager (using the SQLDrivers function) or you'd need to query the registry key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers

MYSQL Query in Database View

SELECT `aversio`.`module`.`module` AS `module`
FROM
`projectmodule`
JOIN `module` ON `aversio`.`projectmodule`.`moduleID` = `aversio`.`module`.`moduleID`
JOIN `project` ON `aversio`.`project`.`projectID` = `aversio`.`projectmodule`.`projectID`
WHERE `aversio`.`module`.`actief` = _utf8'1'
AND `aversio`.`projectmodule`.`verwijderd` = _utf8'0'
AND `aversio`.`projectmodule`.`verwijderd` = _utf8'0'
MYSQL Error : There is no 'aversio'#'%' registered
What this error mean
That actually looks like a permissions issue, like you are trying to connect as aversio to a MySQL server instance which is not configured to allow that user from any (%) domain.
The syntax 'aversio'#'%' looks like the format 'username'#'host', and mysql uses % as the catch-all (any) host wildcard.
Make sure that you create the MySQL user named aversio, and give them the correct permissions on your DB.
EDIT:
IIRC, a user of that name may exist, but with a different domain (i.e. the users table is keyed on the combo of user and host. I've seen this kind of thing happen when I move code from a dev server to a staging server and try to connect fro mthe new host, having forgotten to modify the permissions in MySQL.

Insert LargeBlog sql issue

Right I seem to be having a issue inserting a image into a database (don't ask why lol)
If tryed a simple
UPDATE player SET Image = load_file('94.jpg') WHERE id =94;
And had the image directly located from where im running the sql commands from
UPDATE player
SET Image = load_file('C:\Users\***\Documents\databases\Scripts\94.jpg')
WHERE id =94;
I have also tried the above with the full path but when i query the table it shows the Image column of type LargeBlog as empty!
Any ideas????
The file must be on the machine MySQL is installed on.
I have managed to fix it with the use of forward slashes instead of back slashes. So im getting it into the database now... all goood
but i want to do relative paths and as i said ('94.jpg') doesn't work. When its placed my C:\Wamp directory... Which is the same place I put sql scripts when I run them with a simple
source script.sql; <-Notice no path required and it works. So I assumed that MySql default directory was the Wamp Folder