Create an index FULLTEXT:
CREATE FULLTEXT INDEX fx_music_artist_song ON music (artistname, songname)
and execute the query as follows:
SELECT *
FROM mytable
WHERE MATCH(artistname, songname) AGAINST ('+queen +bohemian' IN BOOLEAN MODE)
This will match both artistname, and songnameeven if the words are not kept.
To match only the artist, you can create an additional index only for artistnameand use it in the query:
SELECT *
FROM mytable
WHERE MATCH(artistname) AGAINST ('+queen' IN BOOLEAN MODE)
, MATCH, , , .
, , .